Current File : /var/www/vinorea/modules/autoupgrade/views/assets/segment-analytics-next-B8n1BW-_.js
/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License version 3.0
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
 */
import{i as t,a as e,b as n,c as r,_ as i,d as o,e as a,f as u,C as s,g as c,h as l,v as f,j as d,P as p,k as h,l as v,m as y,n as g,o as m,p as b}from"./segment-analytics-core-Cvc9gLK6.js";import{E as w,c as _}from"./segment-analytics-generic-utils-EvPM-36Q.js";import{d as S}from"./segment-facade-GjXxjz1z.js";const j={},x=function(t,e,n){let r=Promise.resolve();if(e&&e.length>0){const t=document.getElementsByTagName("link"),i=document.querySelector("meta[property=csp-nonce]"),o=(null==i?void 0:i.nonce)||(null==i?void 0:i.getAttribute("nonce"));r=Promise.allSettled(e.map((e=>{if(e=function(t,e){return new URL(t,e).href}(e,n),e in j)return;j[e]=!0;const r=e.endsWith(".css"),i=r?'[rel="stylesheet"]':"";if(!!n)for(let n=t.length-1;n>=0;n--){const i=t[n];if(i.href===e&&(!r||"stylesheet"===i.rel))return}else if(document.querySelector(`link[href="${e}"]${i}`))return;const a=document.createElement("link");return a.rel=r?"stylesheet":"modulepreload",r||(a.as="script"),a.crossOrigin="",a.href=e,o&&a.setAttribute("nonce",o),document.head.appendChild(a),r?new Promise(((t,n)=>{a.addEventListener("load",t),a.addEventListener("error",(()=>n(new Error(`Unable to preload CSS for ${e}`))))})):void 0})))}function i(t){const e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=t,window.dispatchEvent(e),!e.defaultPrevented)throw t}return r.then((e=>{for(const t of e||[])"rejected"===t.status&&i(t.reason);return t().catch(i)}))};function k(r,i,o,a){var u,s=[r,i,o,a],c=t(r)?r.event:r;if(!c||!e(c))throw new Error("Event missing");var l=t(r)?null!==(u=r.properties)&&void 0!==u?u:{}:t(i)?i:{},f={};return n(o)||(f=null!=o?o:{}),t(r)&&!n(i)&&(f=null!=i?i:{}),[c,l,f,s.find(n)]}function E(r,i,o,a,u){var s,c,l=null,f=null,d=[r,i,o,a,u],p=d.filter(e);void 0!==p[0]&&void 0!==p[1]&&(l=p[0],f=p[1]),1===p.length&&(l=null,f=p[0]);var h=d.find(n),v=d.filter((function(e){return null===f?t(e):t(e)||null===e})),y=null!==(s=v[0])&&void 0!==s?s:{},g=null!==(c=v[1])&&void 0!==c?c:{};return[l,f,y,g,h]}var O=function(i){return function(){for(var o,a,u,s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];for(var l={},f=["callback","options","traits","id"],d=0,p=s;d<p.length;d++){var h=p[d],v=f.pop();if("id"===v){if(e(h)||r(h)){l.id=h.toString();continue}if(null==h)continue;v=f.pop()}if("traits"!==v&&"options"!==v||null!=h&&!t(h)||(l[v]=h),n(h)){l.callback=h;break}}return[null!==(o=l.id)&&void 0!==o?o:i.id(),null!==(a=l.traits)&&void 0!==a?a:{},null!==(u=l.options)&&void 0!==u?u:{},l.callback]}};function A(i,o,a,u){r(i)&&(i=i.toString()),r(o)&&(o=o.toString());var s=[i,o,a,u],c=s.filter(e),l=c[0],f=void 0===l?i:l,d=c[1],p=void 0===d?null:d,h=s.filter(t)[0];return[f,p,void 0===h?{}:h,s.find(n)]}function P(){return"undefined"!=typeof window}function I(){return!P()}function M(){return!P()||window.navigator.onLine}function N(){return!M()}function L(t,e){return e=e||{},new Promise((function(n,r){var i=new XMLHttpRequest,o=[],a=[],u={},s=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:s,headers:{keys:function(){return o},entries:function(){return a},get:function(t){return u[t.toLowerCase()]},has:function(t){return t.toLowerCase()in u}}}};for(var c in i.open(e.method||"get",t,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(t,e,n){o.push(e=e.toLowerCase()),a.push([e,n]),u[e]=u[e]?u[e]+","+n:n})),n(s())},i.onerror=r,i.withCredentials="include"==e.credentials,e.headers)i.setRequestHeader(c,e.headers[c]);i.send(e.body||null)}))}var T=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:null},C=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=T();return(n&&n.fetch||L).apply(void 0,t)},R="1.77.0",U="api.segment.io/v1";function D(t){console.error("Error sending segment performance metrics",t)}var F,z=function(){function t(t){var e,n,r,i,o,a=this;if(this.host=null!==(e=null==t?void 0:t.host)&&void 0!==e?e:U,this.sampleRate=null!==(n=null==t?void 0:t.sampleRate)&&void 0!==n?n:1,this.flushTimer=null!==(r=null==t?void 0:t.flushTimer)&&void 0!==r?r:3e4,this.maxQueueSize=null!==(i=null==t?void 0:t.maxQueueSize)&&void 0!==i?i:20,this.protocol=null!==(o=null==t?void 0:t.protocol)&&void 0!==o?o:"https",this.queue=[],this.sampleRate>0){var u=!1,s=function(){u||(u=!0,a.flush().catch(D),u=!1,setTimeout(s,a.flushTimer))};s()}}return t.prototype.increment=function(t,e){if(t.includes("analytics_js.")&&0!==e.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=function(t,e){var n=e.reduce((function(t,e){var n=e.split(":"),r=n[0],i=n[1];return t[r]=i,t}),{});return{type:"Counter",metric:t,value:1,tags:a(a({},n),{library:"analytics.js",library_version:"npm:next-".concat(R)})}}(t,e);this.queue.push(n),t.includes("error")&&this.flush().catch(D)}},t.prototype.flush=function(){return i(this,void 0,void 0,(function(){var t=this;return o(this,(function(e){switch(e.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(e){D(e),t.sampleRate=0}))];case 1:return e.sent(),[2]}}))}))},t.prototype.send=function(){return i(this,void 0,void 0,(function(){var t,e,n;return o(this,(function(r){return t={series:this.queue},this.queue=[],e={"Content-Type":"text/plain"},n="".concat(this.protocol,"://").concat(this.host,"/m"),[2,C(n,{headers:e,body:JSON.stringify(t),method:"POST"})]}))}))},t}(),q=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.initRemoteMetrics=function(t){F=new z(t)},e.prototype.increment=function(e,n,r){t.prototype.increment.call(this,e,n,r),null==F||F.increment(e,null!=r?r:[])},e}(s),K=function(t){function e(e,n){return t.call(this,e,n,new q)||this}return u(e,t),e.system=function(){return new this({type:"track",event:"system"})},e}(c),B=function(t,e,n,r,i,o){return{__t:"bpc",c:e,p:r,u:t,s:n,t:i,r:o}},V=Object.keys(B("","","","","",""));var J=function(t){var e,n,r=t.c,i=t.p,o=t.s,a=t.u,u=t.r,s=t.t,c=r?function(t){try{return new URL(t).pathname}catch(e){return"/"===t[0]?t:"/"+t}}(r):i,l=r?function(t,e){return t.indexOf("?")>-1?t:t+e}(r,o):-1===(n=(e=a).indexOf("#"))?e:e.slice(0,n);return{path:c,referrer:u,search:o,title:s,url:l}},W=function(){var t=document.querySelector("link[rel='canonical']");return B(location.href,t&&t.getAttribute("href")||void 0,location.search,location.pathname,document.title,document.referrer)};var H=function(t,e){void 0===e&&(e=J(W()));var n,r,i,o=t.context;"page"===t.type&&(n=t.properties&&(r=t.properties,i=Object.keys(e),Object.assign.apply(Object,l([{}],i.map((function(t){var e;if(r&&Object.prototype.hasOwnProperty.call(r,t))return(e={})[t]=r[t],e})),!1))),t.properties=a(a(a({},e),t.properties),t.name?{name:t.name}:{})),o.page=a(a(a({},e),n),o.page)},Q=function(t){function e(e){var n=t.call(this,{createMessageId:function(){return"ajs-next-".concat(Date.now(),"-").concat(f())},onEventMethodCall:function(t){var e=t.options;n.maybeUpdateAnonId(e)},onFinishedEvent:function(t){return n.addIdentity(t),t}})||this;return n.user=e,n}return u(e,t),e.prototype.maybeUpdateAnonId=function(t){(null==t?void 0:t.anonymousId)&&this.user.anonymousId(t.anonymousId)},e.prototype.addIdentity=function(t){this.user.id()&&(t.userId=this.user.id()),this.user.anonymousId()&&(t.anonymousId=this.user.anonymousId())},e.prototype.track=function(e,n,r,i,o){var a=t.prototype.track.call(this,e,n,r,i);return H(a,o),a},e.prototype.page=function(e,n,r,i,o,a){var u=t.prototype.page.call(this,e,n,r,i,o);return H(u,a),u},e.prototype.screen=function(e,n,r,i,o,a){var u=t.prototype.screen.call(this,e,n,r,i,o);return H(u,a),u},e.prototype.identify=function(e,n,r,i,o){var a=t.prototype.identify.call(this,e,n,r,i);return H(a,o),a},e.prototype.group=function(e,n,r,i,o){var a=t.prototype.group.call(this,e,n,r,i);return H(a,o),a},e.prototype.alias=function(e,n,r,i,o){var a=t.prototype.alias.call(this,e,n,r,i);return H(a,o),a},e}(d),G=function(t){return"addMiddleware"in t&&"destination"===t.type},Y={getItem:function(){},setItem:function(){},removeItem:function(){}};try{Y=P()&&window.localStorage?window.localStorage:Y}catch(Ve){console.warn("Unable to access localStorage",Ve)}function Z(t){var e=Y.getItem(t);return(e?JSON.parse(e):[]).map((function(t){return new K(t.event,t.id)}))}function X(t){var e=Y.getItem(t);return e?JSON.parse(e):{}}function tt(t){Y.removeItem(t)}function et(t,e,n){void 0===n&&(n=0);var r,i="persisted-queue:v1:".concat(t,":lock"),o=Y.getItem(i),a=o?JSON.parse(o):null,u=null===a||(r=a,(new Date).getTime()>r);if(u)return Y.setItem(i,JSON.stringify((new Date).getTime()+50)),e(),void Y.removeItem(i);!u&&n<3?setTimeout((function(){et(t,e,n+1)}),50):console.error("Unable to retrieve lock")}var nt=function(t){function e(e,n){var r=t.call(this,e,[])||this,i="persisted-queue:v1:".concat(n,":items"),o="persisted-queue:v1:".concat(n,":seen"),u=[],s={};return et(n,(function(){try{u=Z(i),s=X(o),tt(i),tt(o),r.queue=l(l([],u,!0),r.queue,!0),r.seen=a(a({},s),r.seen)}catch(Ve){console.error(Ve)}})),window.addEventListener("pagehide",(function(){if(r.todo>0){var t=l(l([],r.queue,!0),r.future,!0);try{et(n,(function(){!function(t,e){var n=Z(t),r=l(l([],e,!0),n,!0).reduce((function(t,e){var n;return a(a({},t),((n={})[e.id]=e,n))}),{});Y.setItem(t,JSON.stringify(Object.values(r)))}(i,t),function(t,e){var n=X(t);Y.setItem(t,JSON.stringify(a(a({},n),e)))}(o,r.seen)}))}catch(Ve){console.error(Ve)}}})),r}return u(e,t),e}(p),rt=function(t){function e(e){return t.call(this,"string"==typeof e?new nt(4,e):e)||this}return u(e,t),e.prototype.flush=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return N()?[2,[]]:[2,t.prototype.flush.call(this)]}))}))},e}(h);function it(t){for(var e=t.constructor.prototype,n=0,r=Object.getOwnPropertyNames(e);n<r.length;n++){var i=r[n];if("constructor"!==i){var o=Object.getOwnPropertyDescriptor(t.constructor.prototype,i);o&&"function"==typeof o.value&&(t[i]=t[i].bind(t))}}return t}function ot(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var at=function t(e,n){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=ot({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var a in i)i[a]&&(o+="; "+a,!0!==i[a]&&(o+="="+i[a].split(";")[0]));return document.cookie=t+"="+e.write(r,t)+o}}return Object.create({set:r,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),a=o.slice(1).join("=");try{var u=decodeURIComponent(o[0]);if(r[u]=e.read(a,u),t===u)break}catch(s){}}return t?r[t]:r}},remove:function(t,e){r(t,"",ot({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,ot({},this.attributes,e))},withConverter:function(e){return t(ot({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function ut(t){var e=function(t){try{return new URL(t)}catch(e){return}}(t);if(e)for(var n=function(t){var e=t.hostname.split("."),n=e[e.length-1],r=[];if(4===e.length&&parseInt(n,10)>0)return r;if(e.length<=1)return r;for(var i=e.length-2;i>=0;--i)r.push(e.slice(i).join("."));return r}(e),r=0;r<n.length;++r){var i="__tld__",o=n[r],a={domain:"."+o};try{if(at.set(i,"1",a),at.get(i))return at.remove(i,a),o}catch(u){return}}}var st=function(){function t(e){void 0===e&&(e=t.defaults),this.options=a(a({},t.defaults),e)}return Object.defineProperty(t,"defaults",{get:function(){return{maxage:365,domain:ut(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),t.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},t.prototype.get=function(t){var e;try{var n=at.get(t);if(null==n)return null;try{return null!==(e=JSON.parse(n))&&void 0!==e?e:null}catch(r){return null!=n?n:null}}catch(r){return null}},t.prototype.set=function(t,e){"string"==typeof e?at.set(t,e,this.opts()):null===e?at.remove(t,this.opts()):at.set(t,JSON.stringify(e),this.opts())},t.prototype.remove=function(t){return at.remove(t,this.opts())},t}(),ct=function(){function t(){}return t.prototype.localStorageWarning=function(t,e){console.warn("Unable to access ".concat(t,", localStorage may be ").concat(e))},t.prototype.get=function(t){var e;try{var n=localStorage.getItem(t);if(null===n)return null;try{return null!==(e=JSON.parse(n))&&void 0!==e?e:null}catch(r){return null!=n?n:null}}catch(Ve){return this.localStorageWarning(t,"unavailable"),null}},t.prototype.set=function(t,e){try{localStorage.setItem(t,JSON.stringify(e))}catch(n){this.localStorageWarning(t,"full")}},t.prototype.remove=function(t){try{return localStorage.removeItem(t)}catch(Ve){this.localStorageWarning(t,"unavailable")}},t}(),lt=function(){function t(){this.cache={}}return t.prototype.get=function(t){var e;return null!==(e=this.cache[t])&&void 0!==e?e:null},t.prototype.set=function(t,e){this.cache[t]=e},t.prototype.remove=function(t){delete this.cache[t]},t}(),ft={Cookie:"cookie",LocalStorage:"localStorage",Memory:"memory"};function dt(t){return t&&t.stores&&Array.isArray(t.stores)&&t.stores.every((function(t){return Object.values(ft).includes(t)}))}var pt=function(t,e,n,r){console.warn("".concat(t.constructor.name,": Can't ").concat(e,' key "').concat(n,'" | Err: ').concat(r))},ht=function(){function t(t){this.stores=t}return t.prototype.get=function(t){for(var e=null,n=0,r=this.stores;n<r.length;n++){var i=r[n];try{if(null!=(e=i.get(t)))return e}catch(o){pt(i,"get",t,o)}}return null},t.prototype.set=function(t,e){this.stores.forEach((function(n){try{n.set(t,e)}catch(r){pt(n,"set",t,r)}}))},t.prototype.clear=function(t){this.stores.forEach((function(e){try{e.remove(t)}catch(n){pt(e,"remove",t,n)}}))},t.prototype.getAndSync=function(t){var e=this.get(t),n="number"==typeof e?e.toString():e;return this.set(t,n),n},t}();function vt(t){return t.map((function(t){var e,n;switch(!function(t){return"object"==typeof t&&void 0!==t.name}(t)?e=t:(e=t.name,n=t.settings),e){case ft.Cookie:return new st(n);case ft.LocalStorage:return new ct;case ft.Memory:return new lt;default:throw new Error("Unknown Store Type: ".concat(t))}}))}function yt(t,e){return t.map((function(t){return e&&t===ft.Cookie?{name:t,settings:e}:t}))}var gt={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},mt=function(){function t(t,e){void 0===t&&(t=gt);var n,r,i,o,u=this;this.options={},this.id=function(t){if(u.options.disable)return null;var e=u.identityStore.getAndSync(u.idKey);void 0!==t&&(u.identityStore.set(u.idKey,t),t!==e&&null!==e&&null!==t&&u.anonymousId(null));var n=u.identityStore.getAndSync(u.idKey);if(n)return n;var r=u.legacyUserStore.get(gt.cookie.oldKey);return r?"object"==typeof r?r.id:r:null},this.anonymousId=function(t){var e,n;if(u.options.disable)return null;if(void 0===t){var r=null!==(e=u.identityStore.getAndSync(u.anonKey))&&void 0!==e?e:null===(n=u.legacySIO())||void 0===n?void 0:n[0];if(r)return r}return null===t?(u.identityStore.set(u.anonKey,null),u.identityStore.getAndSync(u.anonKey)):(u.identityStore.set(u.anonKey,null!=t?t:f()),u.identityStore.getAndSync(u.anonKey))},this.traits=function(t){var e;if(!u.options.disable)return null===t&&(t={}),t&&u.traitsStore.set(u.traitsKey,null!=t?t:{}),null!==(e=u.traitsStore.get(u.traitsKey))&&void 0!==e?e:{}},this.options=a(a({},gt),t),this.cookieOptions=e,this.idKey=null!==(r=null===(n=t.cookie)||void 0===n?void 0:n.key)&&void 0!==r?r:gt.cookie.key,this.traitsKey=null!==(o=null===(i=t.localStorage)||void 0===i?void 0:i.key)&&void 0!==o?o:gt.localStorage.key,this.anonKey="ajs_anonymous_id",this.identityStore=this.createStorage(this.options,e),this.legacyUserStore=this.createStorage(this.options,e,(function(t){return t===ft.Cookie})),this.traitsStore=this.createStorage(this.options,e,(function(t){return t!==ft.Cookie}));var s=this.legacyUserStore.get(gt.cookie.oldKey);s&&"object"==typeof s&&(s.id&&this.id(s.id),s.traits&&this.traits(s.traits)),it(this)}return t.prototype.legacySIO=function(){var t=this.legacyUserStore.get("_sio");if(!t)return null;var e=t.split("----");return[e[0],e[1]]},t.prototype.identify=function(t,e){if(!this.options.disable){e=null!=e?e:{};var n=this.id();null!==n&&n!==t||(e=a(a({},this.traits()),e)),t&&this.id(t),this.traits(e)}},t.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},t.prototype.reset=function(){this.logout(),this.identityStore.clear(this.idKey),this.identityStore.clear(this.anonKey),this.traitsStore.clear(this.traitsKey)},t.prototype.load=function(){return new t(this.options,this.cookieOptions)},t.prototype.save=function(){return!0},t.prototype.createStorage=function(t,e,n){var r=[ft.LocalStorage,ft.Cookie,ft.Memory];return t.disable?new ht([]):t.persist?(void 0!==t.storage&&null!==t.storage&&dt(t.storage)&&(r=t.storage.stores),t.localStorageFallbackDisabled&&(r=r.filter((function(t){return t!==ft.LocalStorage}))),n&&(r=r.filter(n)),new ht(vt(yt(r,e)))):new ht([new lt])},t.defaults=gt,t}(),bt={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},wt=function(t){function e(e,n){void 0===e&&(e=bt);var r=t.call(this,a(a({},bt),e),n)||this;return r.anonymousId=function(t){},it(r),r}return u(e,t),e}(mt),_t="analytics";function St(){return window[_t]}var jt=function(t,e,n){n.getAndRemove(t).forEach((function(t){Nt(e,t).catch(console.error)}))},xt=function(t,e){return i(void 0,void 0,void 0,(function(){var n,r,i;return o(this,(function(o){switch(o.label){case 0:n=0,r=e.getAndRemove("addSourceMiddleware"),o.label=1;case 1:return n<r.length?(i=r[n],[4,Nt(t,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},kt=function(t,e){return i(void 0,void 0,void 0,(function(){var n,r,i;return o(this,(function(o){switch(o.label){case 0:n=0,r=e.getAndRemove("register"),o.label=1;case 1:return n<r.length?(i=r[n],[4,Nt(t,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},Et=jt.bind(void 0,"on"),Ot=jt.bind(void 0,"setAnonymousId"),At=function(t){if(Pt(t)){var e=t.pop();return J(e)}},Pt=function(e){return function(e){if(!t(e))return!1;if("bpc"!==e.__t)return!1;for(var n in e)if(!V.includes(n))return!1;return!0}(e[e.length-1])},It=function(){return function(t,e,n,r){void 0===n&&(n=function(){}),void 0===r&&(r=console.error),this.method=t,this.resolve=n,this.reject=r,this.called=!1,this.args=e}}(),Mt=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._callMap={},this.add.apply(this,t)}return Object.defineProperty(t.prototype,"calls",{get:function(){return this._pushSnippetWindowBuffer(),this._callMap},set:function(t){this._callMap=t},enumerable:!1,configurable:!0}),t.prototype.get=function(t){var e;return null!==(e=this.calls[t])&&void 0!==e?e:[]},t.prototype.getAndRemove=function(t){var e=this.get(t);return this.calls[t]=[],e},t.prototype.add=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach((function(e){["track","screen","alias","group","page","identify"].includes(e.method)&&!Pt(e.args)&&(e.args=l(l([],e.args,!0),[W()],!1)),t.calls[e.method]?t.calls[e.method].push(e):t.calls[e.method]=[e]}))},t.prototype.clear=function(){this._pushSnippetWindowBuffer(),this.calls={}},t.prototype.toArray=function(){var t;return(t=[]).concat.apply(t,Object.values(this.calls))},t.prototype._pushSnippetWindowBuffer=function(){},t}();function Nt(t,e){return i(this,void 0,void 0,(function(){var n,r;return o(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e.called?[2,void 0]:(e.called=!0,n=t[e.method].apply(t,e.args),"object"==typeof(o=n)&&null!==o&&"then"in o&&"function"==typeof o.then?[4,n]:[3,2]);case 1:i.sent(),i.label=2;case 2:return e.resolve(n),[3,4];case 3:return r=i.sent(),e.reject(r),[3,4];case 4:return[2]}var o}))}))}var Lt=function(){function t(t){var e=this;this.trackSubmit=this._createMethod("trackSubmit"),this.trackClick=this._createMethod("trackClick"),this.trackLink=this._createMethod("trackLink"),this.pageView=this._createMethod("pageview"),this.identify=this._createMethod("identify"),this.reset=this._createMethod("reset"),this.group=this._createMethod("group"),this.track=this._createMethod("track"),this.ready=this._createMethod("ready"),this.alias=this._createMethod("alias"),this.debug=this._createChainableMethod("debug"),this.page=this._createMethod("page"),this.once=this._createChainableMethod("once"),this.off=this._createChainableMethod("off"),this.on=this._createChainableMethod("on"),this.addSourceMiddleware=this._createMethod("addSourceMiddleware"),this.setAnonymousId=this._createMethod("setAnonymousId"),this.addDestinationMiddleware=this._createMethod("addDestinationMiddleware"),this.screen=this._createMethod("screen"),this.register=this._createMethod("register"),this.deregister=this._createMethod("deregister"),this.user=this._createMethod("user"),this.VERSION=R,this._preInitBuffer=new Mt,this._promise=t(this._preInitBuffer),this._promise.then((function(t){var n=t[0],r=t[1];e.instance=n,e.ctx=r})).catch((function(){}))}return t.prototype.then=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).then.apply(t,e)},t.prototype.catch=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).catch.apply(t,e)},t.prototype.finally=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).finally.apply(t,e)},t.prototype._createMethod=function(t){var e=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(e.instance){var o=(n=e.instance)[t].apply(n,r);return Promise.resolve(o)}return new Promise((function(n,i){e._preInitBuffer.add(new It(t,r,n,i))}))}},t.prototype._createChainableMethod=function(t){var e=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.instance?((n=e.instance)[t].apply(n,r),e):(e._preInitBuffer.add(new It(t,r)),e)}},t}(),Tt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Ct(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Rt(t,e){var n=new S.Facade(t,e);return"track"===t.type&&(n=new S.Track(t,e)),"identify"===t.type&&(n=new S.Identify(t,e)),"page"===t.type&&(n=new S.Page(t,e)),"alias"===t.type&&(n=new S.Alias(t,e)),"group"===t.type&&(n=new S.Group(t,e)),"screen"===t.type&&(n=new S.Screen(t,e)),Object.defineProperty(n,"obj",{value:t,writable:!0}),n}var Ut=function(t){function e(e,n){var r=t.call(this,e)||this;return r.retryTimeout=n,r.name="RateLimitError",r}return u(e,t),e}(Error),Dt=function(t){return a({"Content-Type":"text/plain"},"function"==typeof t?t():t)};function Ft(t){return(encodeURI(JSON.stringify(t)).split(/%..|./).length-1)/1024}function zt(t,e){var n,r,u,s,c,l=[],f=!1,d=null!==(n=null==e?void 0:e.size)&&void 0!==n?n:10,p=null!==(r=null==e?void 0:e.timeout)&&void 0!==r?r:5e3,h=0;function y(n){var r;if(0!==n.length){var i=null===(r=n[0])||void 0===r?void 0:r.writeKey,o=n.map((function(t){var e=t;return e.sentAt,v(e,["sentAt"])}));return C("https://".concat(t,"/b"),{keepalive:(null==e?void 0:e.keepalive)||f,headers:Dt(null==e?void 0:e.headers),method:"post",body:JSON.stringify({writeKey:i,batch:o,sentAt:(new Date).toISOString()}),priority:null==e?void 0:e.priority}).then((function(t){var e;if(t.status>=500)throw new Error("Bad response from server: ".concat(t.status));if(429===t.status){var n=null===(e=t.headers)||void 0===e?void 0:e.get("x-ratelimit-reset"),r="string"==typeof n?1e3*parseInt(n):p;throw new Ut("Rate limit exceeded: ".concat(t.status),r)}}))}}function g(t){var n;return void 0===t&&(t=1),i(this,void 0,void 0,(function(){var r;return o(this,(function(i){return l.length?(r=l,l=[],[2,null===(n=y(r))||void 0===n?void 0:n.catch((function(n){var i;K.system().log("error","Error sending batch",n),t<=(null!==(i=null==e?void 0:e.maxRetries)&&void 0!==i?i:10)&&("RateLimitError"===n.name&&(h=n.retryTimeout),l.push.apply(l,r),l.map((function(e){if("_metadata"in e){var n=e;n._metadata=a(a({},n._metadata),{retryCount:t})}})),m(t+1))}))]):[2]}))}))}function m(t){void 0===t&&(t=1),u||(u=setTimeout((function(){u=void 0,g(t).catch(console.error)}),h||p),h=0)}return s=function(t){if((f=t)&&l.length){var e=(n=l,r=[],i=0,n.forEach((function(t){Ft(r[i])>=64&&i++,r[i]?r[i].push(t):r[i]=[t]})),r).map(y);Promise.all(e).catch(console.error)}var n,r,i},c=!1,window.addEventListener("pagehide",(function(){c||s(c=!0)})),document.addEventListener("visibilitychange",(function(){if("hidden"==document.visibilityState){if(c)return;c=!0}else c=!1;s(c)})),{dispatch:function(t,n){return i(this,void 0,void 0,(function(){var t;return o(this,(function(r){return l.push(n),t=l.length>=d||function(t){return Ft(t)>=450}(l)||(null==e?void 0:e.keepalive)&&function(t){return Ft(t)>=54}(l),[2,t||f?g():m()]}))}))}}}function qt(t,e,n,r,i){var o,u=t.user();delete e.options,e.writeKey=null==n?void 0:n.apiKey,e.userId=e.userId||u.id(),e.anonymousId=e.anonymousId||u.anonymousId(),e.sentAt=new Date;var s=t.queue.failedInitializations||[];s.length>0&&(e._metadata={failedInitializations:s}),null!=i&&(i.attempts>1&&(e._metadata=a(a({},e._metadata),{retryCount:i.attempts})),i.attempts++);var c=[],l=[];for(var f in r){var d=r[f];"Segment.io"===f&&c.push(f),"bundled"===d.bundlingStatus&&c.push(f),"unbundled"===d.bundlingStatus&&l.push(f)}for(var p=0,h=(null==n?void 0:n.unbundledIntegrations)||[];p<h.length;p++){var v=h[p];l.includes(v)||l.push(v)}var y=null!==(o=null==n?void 0:n.maybeBundledConfigIds)&&void 0!==o?o:{},g=[];return c.sort().forEach((function(t){var e;(null!==(e=y[t])&&void 0!==e?e:[]).forEach((function(t){g.push(t)}))})),!1!==(null==n?void 0:n.addBundledMetadata)&&(e._metadata=a(a({},e._metadata),{bundled:c.sort(),unbundled:l.sort(),bundledIds:g})),e}var Kt=function(t,e){return i(void 0,void 0,void 0,(function(){var n;return o(this,(function(r){return[2,(n=function(r){return i(void 0,void 0,void 0,(function(){var i;return o(this,(function(o){switch(o.label){case 0:return t(r)?(i=n,[4,e()]):[3,2];case 1:return[2,i.apply(void 0,[o.sent()])];case 2:return[2]}}))}))})(void 0)]}))}))};function Bt(t,e){return i(this,void 0,void 0,(function(){var n,r=this;return o(this,(function(a){switch(a.label){case 0:return n=[],N()?[2,e]:[4,Kt((function(){return e.length>0&&!N()}),(function(){return i(r,void 0,void 0,(function(){var r,i;return o(this,(function(o){switch(o.label){case 0:return(r=e.pop())?[4,y(r,t)]:[2];case 1:return i=o.sent(),i instanceof K||n.push(r),[2]}}))}))}))];case 1:return a.sent(),n.map((function(t){return e.pushWithBackoff(t)})),[2,e]}}))}))}function Vt(t,e,n,r){var a=this;t||setTimeout((function(){return i(a,void 0,void 0,(function(){var t,i;return o(this,(function(o){switch(o.label){case 0:return t=!0,[4,Bt(n,e)];case 1:return i=o.sent(),t=!1,e.todo>0&&r(t,i,n,r),[2]}}))}))}),5e3*Math.random())}var Jt=function(t){return"Segment.io"===t.name};function Wt(t,e,n){var r,a,u;window.addEventListener("pagehide",(function(){l.push.apply(l,Array.from(f)),f.clear()}));var s,c=null!==(r=null==e?void 0:e.apiKey)&&void 0!==r?r:"",l=t.options.disableClientPersistence?new p(t.queue.queue.maxAttempts,[]):new nt(t.queue.queue.maxAttempts,"".concat(c,":dest-Segment.io")),f=new Set,d=!1,h=null!==(a=null==e?void 0:e.apiHost)&&void 0!==a?a:U,v=null!==(u=null==e?void 0:e.protocol)&&void 0!==u?u:"https",y="".concat(v,"://").concat(h),g=null==e?void 0:e.deliveryStrategy,m=g&&"strategy"in g&&"batching"===g.strategy?zt(h,g.config):(s=null==g?void 0:g.config,{dispatch:function(t,e){return C(t,{keepalive:null==s?void 0:s.keepalive,headers:Dt(null==s?void 0:s.headers),method:"post",body:JSON.stringify(e),priority:null==s?void 0:s.priority}).then((function(t){var e;if(t.status>=500)throw new Error("Bad response from server: ".concat(t.status));if(429===t.status){var n=null===(e=t.headers)||void 0===e?void 0:e.get("x-ratelimit-reset"),r=n?1e3*parseInt(n):5e3;throw new Ut("Rate limit exceeded: ".concat(t.status),r)}}))}});function b(r){return i(this,void 0,void 0,(function(){var i,a;return o(this,(function(o){return N()?(l.push(r),Vt(d,l,w,Vt),[2,r]):(f.add(r),i=r.event.type.charAt(0),a=Rt(r.event).json(),"track"===r.event.type&&delete a.traits,"alias"===r.event.type&&(a=function(t,e){var n,r,i,o,a=t.user();return e.previousId=null!==(i=null!==(r=null!==(n=e.previousId)&&void 0!==n?n:e.from)&&void 0!==r?r:a.id())&&void 0!==i?i:a.anonymousId(),e.userId=null!==(o=e.userId)&&void 0!==o?o:e.to,delete e.from,delete e.to,e}(t,a)),[2,m.dispatch("".concat(y,"/").concat(i),qt(t,a,e,n,r)).then((function(){return r})).catch((function(t){if(r.log("error","Error sending event",t),"RateLimitError"===t.name){var e=t.retryTimeout;l.pushWithBackoff(r,e)}else l.pushWithBackoff(r);return Vt(d,l,w,Vt),r})).finally((function(){f.delete(r)}))])}))}))}var w={metadata:{writeKey:c,apiHost:h,protocol:v},name:"Segment.io",type:"destination",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:b,identify:b,page:b,alias:b,group:b,screen:b};return l.todo&&Vt(d,l,w,Vt),w}var Ht="This is being deprecated and will be not be available in future releases of Analytics JS",Qt=T(),Gt=null==Qt?void 0:Qt.analytics;var $t=function(){function t(t,e){var n;this.timeout=300,this._getSegmentPluginMetadata=function(){var t;return null===(t=e.plugins.find(Jt))||void 0===t?void 0:t.metadata},this.writeKey=t.writeKey;this.cdnSettings=null!==(n=t.cdnSettings)&&void 0!==n?n:{integrations:{"Segment.io":{apiKey:""}}},this.cdnURL=t.cdnURL}return Object.defineProperty(t.prototype,"apiHost",{get:function(){var t,e;return null===(e=null===(t=this._getSegmentPluginMetadata)||void 0===t?void 0:t.call(this))||void 0===e?void 0:e.apiHost},enumerable:!1,configurable:!0}),t}();function Yt(){console.warn(Ht)}var Zt=function(t){function e(e,n,r,i,o){var u,s,c=this;(c=t.call(this)||this)._debug=!1,c.initialized=!1,c.user=function(){return c._user},c.init=c.initialize.bind(c),c.log=Yt,c.addIntegrationMiddleware=Yt,c.listeners=Yt,c.addEventListener=Yt,c.removeAllListeners=Yt,c.removeListener=Yt,c.removeEventListener=Yt,c.hasListeners=Yt,c.add=Yt,c.addIntegration=Yt;var l=null==n?void 0:n.cookie,f=null!==(u=null==n?void 0:n.disableClientPersistence)&&void 0!==u&&u;c.queue=null!=r?r:function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var r=e?10:1,i=n?new p(r,[]):new nt(r,t);return new rt(i)}("".concat(e.writeKey,":event-queue"),null==n?void 0:n.retryQueue,f),c.settings=new $t(e,c.queue);var d=null==n?void 0:n.storage;return c._universalStorage=c.createStore(f,d,l),c._user=null!=i?i:new mt(a({persist:!f,storage:null==n?void 0:n.storage},null==n?void 0:n.user),l).load(),c._group=null!=o?o:new wt(a({persist:!f,storage:null==n?void 0:n.storage},null==n?void 0:n.group),l).load(),c.eventFactory=new Q(c._user),c.integrations=null!==(s=null==n?void 0:n.integrations)&&void 0!==s?s:{},c.options=null!=n?n:{},it(c),c}return u(e,t),e.prototype.createStore=function(t,e,n){return t?new ht([new lt]):e&&dt(e)?new ht(vt(yt(e.stores,n))):new ht(vt([ft.LocalStorage,{name:ft.Cookie,settings:n},ft.Memory]))},Object.defineProperty(e.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),e.prototype.track=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(this,void 0,void 0,(function(){var e,n,r,i,a,u,s,c=this;return o(this,(function(o){return e=At(t),n=k.apply(void 0,t),r=n[0],i=n[1],a=n[2],u=n[3],s=this.eventFactory.track(r,i,a,this.integrations,e),[2,this._dispatch(s,u).then((function(t){return c.emit("track",r,t.event.properties,t.event.options),t}))]}))}))},e.prototype.page=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(this,void 0,void 0,(function(){var e,n,r,i,a,u,s,c,l=this;return o(this,(function(o){return e=At(t),n=E.apply(void 0,t),r=n[0],i=n[1],a=n[2],u=n[3],s=n[4],c=this.eventFactory.page(r,i,a,u,this.integrations,e),[2,this._dispatch(c,s).then((function(t){return l.emit("page",r,i,t.event.properties,t.event.options),t}))]}))}))},e.prototype.identify=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(this,void 0,void 0,(function(){var e,n,r,i,a,u,s,c=this;return o(this,(function(o){return e=At(t),n=O(this._user).apply(void 0,t),r=n[0],i=n[1],a=n[2],u=n[3],this._user.identify(r,i),s=this.eventFactory.identify(this._user.id(),this._user.traits(),a,this.integrations,e),[2,this._dispatch(s,u).then((function(t){return c.emit("identify",t.event.userId,t.event.traits,t.event.options),t}))]}))}))},e.prototype.group=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=At(e);if(0===e.length)return this._group;var i=O(this._group).apply(void 0,e),o=i[0],a=i[1],u=i[2],s=i[3];this._group.identify(o,a);var c=this._group.id(),l=this._group.traits(),f=this.eventFactory.group(c,l,u,this.integrations,r);return this._dispatch(f,s).then((function(e){return t.emit("group",e.event.groupId,e.event.traits,e.event.options),e}))},e.prototype.alias=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(this,void 0,void 0,(function(){var e,n,r,i,a,u,s,c=this;return o(this,(function(o){return e=At(t),n=A.apply(void 0,t),r=n[0],i=n[1],a=n[2],u=n[3],s=this.eventFactory.alias(r,i,a,this.integrations,e),[2,this._dispatch(s,u).then((function(t){return c.emit("alias",r,i,t.event.options),t}))]}))}))},e.prototype.screen=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(this,void 0,void 0,(function(){var e,n,r,i,a,u,s,c,l=this;return o(this,(function(o){return e=At(t),n=E.apply(void 0,t),r=n[0],i=n[1],a=n[2],u=n[3],s=n[4],c=this.eventFactory.screen(r,i,a,u,this.integrations,e),[2,this._dispatch(c,s).then((function(t){return l.emit("screen",r,i,t.event.properties,t.event.options),t}))]}))}))},e.prototype.trackClick=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(this,void 0,void 0,(function(){var e,n;return o(this,(function(r){switch(r.label){case 0:return[4,x((()=>Promise.resolve().then((()=>Ae))),void 0,import.meta.url)];case 1:return e=r.sent(),[2,(n=e.link).call.apply(n,l([this],t,!1))]}}))}))},e.prototype.trackLink=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(this,void 0,void 0,(function(){var e,n;return o(this,(function(r){switch(r.label){case 0:return[4,x((()=>Promise.resolve().then((()=>Ae))),void 0,import.meta.url)];case 1:return e=r.sent(),[2,(n=e.link).call.apply(n,l([this],t,!1))]}}))}))},e.prototype.trackSubmit=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(this,void 0,void 0,(function(){var e,n;return o(this,(function(r){switch(r.label){case 0:return[4,x((()=>Promise.resolve().then((()=>Ae))),void 0,import.meta.url)];case 1:return e=r.sent(),[2,(n=e.form).call.apply(n,l([this],t,!1))]}}))}))},e.prototype.trackForm=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(this,void 0,void 0,(function(){var e,n;return o(this,(function(r){switch(r.label){case 0:return[4,x((()=>Promise.resolve().then((()=>Ae))),void 0,import.meta.url)];case 1:return e=r.sent(),[2,(n=e.form).call.apply(n,l([this],t,!1))]}}))}))},e.prototype.register=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(this,void 0,void 0,(function(){var e,n,r=this;return o(this,(function(i){switch(i.label){case 0:return e=K.system(),n=t.map((function(t){return r.queue.register(e,t,r)})),[4,Promise.all(n)];case 1:return i.sent(),[2,e]}}))}))},e.prototype.deregister=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(this,void 0,void 0,(function(){var e,n,r=this;return o(this,(function(i){switch(i.label){case 0:return e=K.system(),n=t.map((function(t){var n=r.queue.plugins.find((function(e){return e.name===t}));if(n)return r.queue.deregister(e,n,r);e.log("warn","plugin ".concat(t," not found"))})),[4,Promise.all(n)];case 1:return i.sent(),[2,e]}}))}))},e.prototype.debug=function(t){return!1===t&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=t,this},e.prototype.reset=function(){this._user.reset(),this._group.reset(),this.emit("reset")},e.prototype.timeout=function(t){this.settings.timeout=t},e.prototype._dispatch=function(t,e){return i(this,void 0,void 0,(function(){var n;return o(this,(function(r){return(n=new K(t)).stats.increment("analytics_js.invoke",1,[t.type]),N()&&!this.options.retryQueue?[2,n]:[2,g(n,this.queue,this,{callback:e,debug:this._debug,timeout:this.settings.timeout})]}))}))},e.prototype.addSourceMiddleware=function(t){return i(this,void 0,void 0,(function(){var e=this;return o(this,(function(n){switch(n.label){case 0:return[4,this.queue.criticalTasks.run((function(){return i(e,void 0,void 0,(function(){var e,n,r;return o(this,(function(i){switch(i.label){case 0:return[4,x((()=>Promise.resolve().then((()=>ve))),void 0,import.meta.url)];case 1:return e=i.sent().sourceMiddlewarePlugin,n={},this.queue.plugins.forEach((function(t){if("destination"===t.type)return n[t.name]=!0})),r=e(t,n),[4,this.register(r)];case 2:return i.sent(),[2]}}))}))}))];case 1:return n.sent(),[2,this]}}))}))},e.prototype.addDestinationMiddleware=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this.queue.plugins.filter(G).forEach((function(n){"*"!==t&&n.name.toLowerCase()!==t.toLowerCase()||n.addMiddleware.apply(n,e)})),Promise.resolve(this)},e.prototype.setAnonymousId=function(t){return this._user.anonymousId(t)},e.prototype.queryString=function(t){return i(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return!1===this.options.useQueryString?[2,[]]:[4,x((()=>Promise.resolve().then((()=>Ie))),void 0,import.meta.url)];case 1:return[2,(0,e.sent().queryString)(this,t)]}}))}))},e.prototype.use=function(t){return t(this),this},e.prototype.ready=function(t){return void 0===t&&(t=function(t){return t}),i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,Promise.all(this.queue.plugins.map((function(t){return t.ready?t.ready():Promise.resolve()}))).then((function(e){return t(e),e}))]}))}))},e.prototype.noConflict=function(){var t;return console.warn(Ht),t=null!=Gt?Gt:this,window[_t]=t,this},e.prototype.normalize=function(t){return console.warn(Ht),this.eventFactory.normalize(t)},Object.defineProperty(e.prototype,"failedInitializations",{get:function(){return console.warn(Ht),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"VERSION",{get:function(){return R},enumerable:!1,configurable:!0}),e.prototype.initialize=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(t){return console.warn(Ht),[2,Promise.resolve(this)]}))}))},e.prototype.pageview=function(t){return i(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return console.warn(Ht),[4,this.page({path:t})];case 1:return e.sent(),[2,this]}}))}))},Object.defineProperty(e.prototype,"plugins",{get:function(){var t;return console.warn(Ht),null!==(t=this._plugins)&&void 0!==t?t:{}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Integrations",{get:function(){return console.warn(Ht),this.queue.plugins.filter((function(t){return"destination"===t.type})).reduce((function(t,e){var n="".concat(e.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),r=window[n];if(!r)return t;var i=r.Integration;return i?(t[e.name]=i,t):(t[e.name]=r,t)}),{})},enumerable:!1,configurable:!0}),e.prototype.push=function(t){var e=t.shift();e&&!this[e]||this[e].apply(this,t)},e}(w),Xt=function(t){function e(){var e=t.call(this,{writeKey:""},{disableClientPersistence:!0})||this;return e.initialized=!0,e}return u(e,t),e}(Zt),te={};function ee(){return"undefined"!=typeof process&&te?te:{}}var ne,re,ie=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,oe=function(){var t,e=null!=ne?ne:null===(t=St())||void 0===t?void 0:t._cdn;if(e)return e;var n,r=(Array.prototype.slice.call(document.querySelectorAll("script")).forEach((function(t){var e,r=null!==(e=t.getAttribute("src"))&&void 0!==e?e:"",i=ie.exec(r);i&&i[1]&&(n=i[1])})),n);return r||"https://cdn.segment.com"},ae=function(){var t=oe();return"".concat(t,"/next-integrations")};function ue(t,e){var n,r=Object.entries(null!==(n=e.integrations)&&void 0!==n?n:{}).reduce((function(t,e){var n,r,i=e[0],o=e[1];return a(a({},t),"object"==typeof o?((n={})[i]=o,n):((r={})[i]={},r))}),{});return Object.entries(t.integrations).reduce((function(t,e){var n,i=e[0],o=e[1];return a(a({},t),((n={})[i]=a(a({},o),r[i]),n))}),{})}function se(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t}}function ce(t){return i(this,void 0,void 0,(function(){var e;return o(this,(function(n){return(e=navigator.userAgentData)?t?[2,e.getHighEntropyValues(t).catch((function(){return e.toJSON()}))]:[2,e.toJSON()]:[2,void 0]}))}))}function le(){if(re)return re;var t=ut(window.location.href);return re={expires:31536e6,secure:!1,path:"/"},t&&(re.domain=t),re}var fe=new(function(){return function(){var t=this;this.name="Page Enrichment",this.type="before",this.version="0.1.0",this.isLoaded=function(){return!0},this.load=function(e,n){return i(t,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:this.instance=n,e.label=1;case 1:return e.trys.push([1,3,,4]),t=this,[4,ce(this.instance.options.highEntropyValuesClientHints)];case 2:return t.userAgentData=e.sent(),[3,4];case 3:return e.sent(),[3,4];case 4:return[2,Promise.resolve()]}}))}))},this.enrich=function(e){var n,r,i=e.event.context,o=i.page.search||"",u="object"==typeof o?function(t){try{var e=new URLSearchParams;return Object.entries(t).forEach((function(t){var n=t[0],r=t[1];Array.isArray(r)?r.forEach((function(t){return e.append(n,t)})):e.append(n,r)})),e.toString()}catch(n){return""}}(o):o;i.userAgent=navigator.userAgent,i.userAgentData=t.userAgentData;var s=navigator.userLanguage||navigator.language;void 0===i.locale&&void 0!==s&&(i.locale=s),null!==(n=i.library)&&void 0!==n||(i.library={name:"analytics.js",version:"".concat("npm:next","-").concat(R)}),u&&!i.campaign&&(i.campaign=function(t){return t.startsWith("?")&&(t=t.substring(1)),(t=t.replace(/\?/g,"&")).split("&").reduce((function(t,e){var n=e.split("="),r=n[0],i=n[1],o=void 0===i?"":i;if(r.includes("utm_")&&r.length>4){var a=r.slice(4);"campaign"===a&&(a="name"),t[a]=se(o)}return t}),{})}(u));var c=function(){var t=at.get("_ga");if(t&&t.startsWith("amp"))return t}();c&&(i.amp={id:c}),function(t,e,n){var r,i=new ht(n?[]:[new st(le())]),o=i.get("s:context.referrer"),u=null!==(r=function(t){var e={btid:"dataxu",urid:"millennial-media"};t.startsWith("?")&&(t=t.substring(1));for(var n=0,r=(t=t.replace(/\?/g,"&")).split("&");n<r.length;n++){var i=r[n].split("="),o=i[0],a=i[1];if(e[o])return{id:a,type:e[o]}}}(t))&&void 0!==r?r:o;u&&(e&&(e.referrer=a(a({},e.referrer),u)),i.set("s:context.referrer",u))}(u,i,null!==(r=t.instance.options.disableClientPersistence)&&void 0!==r&&r);try{i.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(l){}return e},this.track=this.enrich,this.identify=this.enrich,this.page=this.enrich,this.group=this.enrich,this.alias=this.enrich,this.screen=this.enrich}}());function de(t){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find((function(e){return e.src===t}))}function pe(t,e){var n=de(t);if(void 0!==n){var r=null==n?void 0:n.getAttribute("status");if("loaded"===r)return Promise.resolve(n);if("loading"===r)return new Promise((function(t,e){n.addEventListener("load",(function(){return t(n)})),n.addEventListener("error",(function(t){return e(t)}))}))}return new Promise((function(e,n){var r,i=window.document.createElement("script");i.type="text/javascript",i.src=t,i.async=!0,i.setAttribute("status","loading");for(var o=0,a=Object.entries({});o<a.length;o++){var u=a[o],s=u[0],c=u[1];i.setAttribute(s,c)}i.onload=function(){i.onerror=i.onload=null,i.setAttribute("status","loaded"),e(i)},i.onerror=function(){i.onerror=i.onload=null,i.setAttribute("status","error"),n(new Error("Failed to load ".concat(t)))};var l=window.document.querySelector("script");l?null===(r=l.parentElement)||void 0===r||r.insertBefore(i,l):window.document.head.appendChild(i)}))}function he(t,e,n){return i(this,void 0,void 0,(function(){function r(e,n){return i(this,void 0,void 0,(function(){var r,i,u;return o(this,(function(o){switch(o.label){case 0:return r=!1,i=null,[4,n({payload:Rt(e,{clone:!0,traverse:!1}),integration:t,next:function(t){r=!0,null===t&&(i=null),t&&(i=t.obj)}})];case 1:return o.sent(),r||null===i||(i.integrations=a(a({},e.integrations),((u={})[t]=!1,u))),[2,i]}}))}))}var u,s,c,l,f;return o(this,(function(t){switch(t.label){case 0:u=Rt(e,{clone:!0,traverse:!1}).rawEvent(),s=0,c=n,t.label=1;case 1:return s<c.length?(l=c[s],[4,r(u,l)]):[3,4];case 2:if(null===(f=t.sent()))return[2,null];u=f,t.label=3;case 3:return s++,[3,1];case 4:return[2,u]}}))}))}const ve=Object.freeze(Object.defineProperty({__proto__:null,applyDestinationMiddleware:he,sourceMiddlewarePlugin:function(t,e){function n(n){return i(this,void 0,void 0,(function(){var r;return o(this,(function(i){switch(i.label){case 0:return r=!1,[4,t({payload:Rt(n.event,{clone:!0,traverse:!1}),integrations:null!=e?e:{},next:function(t){r=!0,t&&(n.event=t.obj)}})];case 1:if(i.sent(),!r)throw new m({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}}))}))}return{name:"Source Middleware ".concat(t.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(t){return Promise.resolve(t)},track:n,page:n,screen:n,identify:n,alias:n,group:n}}},Symbol.toStringTag,{value:"Module"}));function ye(t,e){var n=e.methodName,r=e.integrationName,i=e.type,o=e.didError,a=void 0!==o&&o;t.stats.increment("analytics_js.integration.invoke".concat(a?".error":""),1,["method:".concat(n),"integration_name:".concat(r),"type:".concat(i)])}var ge,me,be=function(){function t(t,e){this.version="1.0.0",this.alternativeNames=[],this.loadPromise=_(),this.middleware=[],this.alias=this._createMethod("alias"),this.group=this._createMethod("group"),this.identify=this._createMethod("identify"),this.page=this._createMethod("page"),this.screen=this._createMethod("screen"),this.track=this._createMethod("track"),this.action=e,this.name=t,this.type=e.type,this.alternativeNames.push(e.name)}return t.prototype.addMiddleware=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];"destination"===this.type&&(t=this.middleware).push.apply(t,e)},t.prototype.transform=function(t){return i(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,he(this.name,t.event,this.middleware)];case 1:return null===(e=n.sent())&&t.cancel(new m({retry:!1,reason:"dropped by destination middleware"})),[2,new K(e)]}}))}))},t.prototype._createMethod=function(t){var e=this;return function(n){return i(e,void 0,void 0,(function(){var e,r;return o(this,(function(i){switch(i.label){case 0:return this.action[t]?(e=n,"destination"!==this.type?[3,2]:[4,this.transform(n)]):[2,n];case 1:e=i.sent(),i.label=2;case 2:return i.trys.push([2,5,,6]),[4,this.ready()];case 3:if(!i.sent())throw new Error("Something prevented the destination from getting ready");return ye(n,{integrationName:this.action.name,methodName:t,type:"action"}),[4,this.action[t](e)];case 4:return i.sent(),[3,6];case 5:throw r=i.sent(),ye(n,{integrationName:this.action.name,methodName:t,type:"action",didError:!0}),r;case 6:return[2,n]}}))}))}},t.prototype.isLoaded=function(){return this.action.isLoaded()},t.prototype.ready=function(){return i(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.loadPromise.promise];case 1:return t.sent(),[2,!0];case 2:return t.sent(),[2,!1];case 3:return[2]}}))}))},t.prototype.load=function(t,e){return i(this,void 0,void 0,(function(){var n,r,i,a;return o(this,(function(o){switch(o.label){case 0:if(this.loadPromise.isSettled())return[2,this.loadPromise.promise];o.label=1;case 1:return o.trys.push([1,3,,4]),ye(t,{integrationName:this.action.name,methodName:"load",type:"action"}),n=this.action.load(t,e),i=(r=this.loadPromise).resolve,[4,n];case 2:return i.apply(r,[o.sent()]),[2,n];case 3:throw a=o.sent(),ye(t,{integrationName:this.action.name,methodName:"load",type:"action",didError:!0}),this.loadPromise.reject(a),a;case 4:return[2]}}))}))},t.prototype.unload=function(t,e){var n,r;return null===(r=(n=this.action).unload)||void 0===r?void 0:r.call(n,t,e)},t}();function we(t,e){return i(this,void 0,void 0,(function(){var n,r,i,a,u,s;return o(this,(function(o){switch(o.label){case 0:if(o.trys.push([0,9,,10]),n=new RegExp("https://cdn.segment.(com|build)"),r=oe(),!e)return[3,6];i=t.url.split("/"),a=i[i.length-2],u=t.url.replace(a,btoa(a).replace(/=/g,"")),o.label=1;case 1:return o.trys.push([1,3,,5]),[4,pe(u.replace(n,r))];case 2:return o.sent(),[3,5];case 3:return o.sent(),[4,pe(t.url.replace(n,r))];case 4:return o.sent(),[3,5];case 5:return[3,8];case 6:return[4,pe(t.url.replace(n,r))];case 7:o.sent(),o.label=8;case 8:return"function"==typeof window[t.libraryName]?[2,window[t.libraryName]]:[3,10];case 9:throw s=o.sent(),console.error("Failed to create PluginFactory",t),s;case 10:return[2]}}))}))}function _e(t,e,n,r,u,s){var c,l,f;return i(this,void 0,void 0,(function(){var d,p,h,v=this;return o(this,(function(y){switch(y.label){case 0:return d=[],p=null!==(l=null===(c=t.middlewareSettings)||void 0===c?void 0:c.routingRules)&&void 0!==l?l:[],h=(null!==(f=t.remotePlugins)&&void 0!==f?f:[]).map((function(t){return i(v,void 0,void 0,(function(){var i,c,l,f,h,v,y;return o(this,(function(o){switch(o.label){case 0:if(function(t,e){var n=t[e.creationName],r=t[e.name];return!1===t.All&&!n&&!r||!1===n||!1===r}(e,t))return[2];o.label=1;case 1:return o.trys.push([1,6,,7]),(c=null==s?void 0:s.find((function(e){return e.pluginName===t.name})))?[3,3]:[4,we(t,null==r?void 0:r.obfuscate)];case 2:c=o.sent(),o.label=3;case 3:return(i=c)?(l=n[t.name],[4,i(a(a({},t.settings),l))]):[3,5];case 4:f=o.sent(),function(t){if(!Array.isArray(t))throw new Error("Not a valid list of plugins");var e=["load","isLoaded","name","version","type"];t.forEach((function(t){e.forEach((function(e){var n;if(void 0===t[e])throw new Error("Plugin: ".concat(null!==(n=t.name)&&void 0!==n?n:"unknown"," missing required function ").concat(e))}))}))}(h=Array.isArray(f)?f:[f]),v=p.filter((function(e){return e.destinationName===t.creationName})),h.forEach((function(e){var n=new be(t.creationName,e);v.length&&u&&n.addMiddleware(u),d.push(n)})),o.label=5;case 5:return[3,7];case 6:return y=o.sent(),console.warn("Failed to load Remote Plugin",y),[3,7];case 7:return[2]}}))}))})),[4,Promise.all(h)];case 1:return y.sent(),[2,d.filter(Boolean)]}}))}))}var Se=null!==(ge=(me=T()).__SEGMENT_INSPECTOR__)&&void 0!==ge?ge:me.__SEGMENT_INSPECTOR__={};function je(t,e,n){return i(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,xe(t,e)];case 1:return r.sent(),function(t,e){Object.keys(e.calls).forEach((function(n){e.getAndRemove(n).forEach((function(e){setTimeout((function(){Nt(t,e).catch(console.error)}),0)}))}))}(t,n),[2]}}))}))}var xe=function(t,e){return i(void 0,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return e.includes("ajs_")?[4,t.queryString(e).catch(console.error)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}}))}))};function ke(t,e,n,r,a,u,s){var c,f,d;return void 0===a&&(a=[]),i(this,void 0,void 0,(function(){var p,h,v,y,g,m,b,w,_,S,j,k,E,O,A=this;return o(this,(function(P){switch(P.label){case 0:return function(t,e){Ot(t,e),Et(t,e)}(n,s),p=null==a?void 0:a.filter((function(t){return"object"==typeof t})),h=null==a?void 0:a.filter((function(t){return"function"==typeof t&&"string"==typeof t.pluginName})),function(t){var e,n,r;return"test"!==ee().NODE_ENV&&(null!==(r=null===(n=null===(e=t.middlewareSettings)||void 0===e?void 0:e.routingRules)||void 0===n?void 0:n.length)&&void 0!==r?r:0)>0}(e)?[4,x((()=>Promise.resolve().then((()=>Le))),void 0,import.meta.url).then((function(t){return t.tsubMiddleware(e.middlewareSettings.routingRules)}))]:[3,2];case 1:return y=P.sent(),[3,3];case 2:y=void 0,P.label=3;case 3:return v=y,I=e,"test"!==ee().NODE_ENV&&Object.keys(I.integrations).length>1||u.length>0?[4,x((()=>Promise.resolve().then((()=>ze))),void 0,import.meta.url).then((function(i){return i.ajsDestinations(t,e,n.integrations,r,v,u)}))]:[3,5];case 4:return m=P.sent(),[3,6];case 5:m=[],P.label=6;case 6:return g=m,e.legacyVideoPluginsEnabled?[4,x((()=>Promise.resolve().then((()=>qe))),void 0,import.meta.url).then((function(t){return t.loadLegacyVideoPlugins(n)}))]:[3,8];case 7:P.sent(),P.label=8;case 8:return(null===(c=r.plan)||void 0===c?void 0:c.track)?[4,x((()=>Promise.resolve().then((()=>Ke))),void 0,import.meta.url).then((function(t){var n;return t.schemaFilter(null===(n=r.plan)||void 0===n?void 0:n.track,e)}))]:[3,10];case 9:return w=P.sent(),[3,11];case 10:w=void 0,P.label=11;case 11:return b=w,_=ue(e,r),[4,_e(e,n.integrations,_,r,v,h).catch((function(){return[]}))];case 12:return S=P.sent(),j=l(l([fe],g,!0),S,!0),b&&j.push(b),!1===(null===(f=r.integrations)||void 0===f?void 0:f.All)&&!r.integrations["Segment.io"]||r.integrations&&!1===r.integrations["Segment.io"]?[3,14]:(E=(k=j).push,[4,Wt(n,_["Segment.io"],e.integrations)]);case 13:E.apply(k,[P.sent()]),P.label=14;case 14:return[4,n.register.apply(n,l(l([],j,!1),p,!1))];case 15:return O=P.sent(),[4,kt(n,s)];case 16:return P.sent(),Object.entries(null!==(d=e.enabledMiddleware)&&void 0!==d?d:{}).some((function(t){return t[1]}))?[4,x((()=>Promise.resolve().then((()=>Be))),void 0,import.meta.url).then((function(t){var a=t.remoteMiddlewares;return i(A,void 0,void 0,(function(){var t,i;return o(this,(function(o){switch(o.label){case 0:return[4,a(O,e,r.obfuscate)];case 1:return t=o.sent(),i=t.map((function(t){return n.addSourceMiddleware(t)})),[2,Promise.all(i)]}}))}))}))]:[3,18];case 17:P.sent(),P.label=18;case 18:return[4,xt(n,s)];case 19:return P.sent(),[2,O]}var I}))}))}function Ee(t,e,n){var r,u,s,c,l,f,d,p,h;return void 0===e&&(e={}),i(this,void 0,void 0,(function(){var i,v,y,g,m,b,w,_,S,j;return o(this,(function(o){switch(o.label){case 0:return!0===e.disable?[2,[new Xt,K.system()]]:(e.globalAnalyticsKey&&(A=e.globalAnalyticsKey,_t=A),t.cdnURL&&(E=t.cdnURL,(O=St())&&(O._cdn=E),ne=E),e.initialPageview&&n.add(new It("page",[])),i=function(){var t,e,n=null!==(t=window.location.hash)&&void 0!==t?t:"",r=null!==(e=window.location.search)&&void 0!==e?e:"";return r.length?r:n.replace(/(?=#).*(?=\?)/,"")}(),v=null!==(r=t.cdnURL)&&void 0!==r?r:oe(),null===(u=t.cdnSettings)||void 0===u?[3,1]:(g=u,[3,3]));case 1:return[4,(x=t.writeKey,k=v,C("".concat(k,"/v1/projects/").concat(x,"/settings")).then((function(t){return t.ok?t.json():t.text().then((function(t){throw new Error(t)}))})).catch((function(t){throw console.error(t.message),t})))];case 2:g=o.sent(),o.label=3;case 3:return y=g,e.updateCDNSettings&&(y=e.updateCDNSettings(y)),"function"!=typeof e.disable?[3,5]:[4,e.disable(y)];case 4:if(o.sent())return[2,[new Xt,K.system()]];o.label=5;case 5:return m=null===(c=null===(s=y.integrations["Segment.io"])||void 0===s?void 0:s.retryQueue)||void 0===c||c,e=a({retryQueue:m},e),function(t){var e;null===(e=Se.attach)||void 0===e||e.call(Se,t)}(b=new Zt(a(a({},t),{cdnSettings:y,cdnURL:v}),e)),w=null!==(l=t.plugins)&&void 0!==l?l:[],_=null!==(f=t.classicIntegrations)&&void 0!==f?f:[],S=null===(d=e.integrations)||void 0===d?void 0:d["Segment.io"],q.initRemoteMetrics(a(a({},y.metrics),{host:null!==(p=null==S?void 0:S.apiHost)&&void 0!==p?p:null===(h=y.metrics)||void 0===h?void 0:h.host,protocol:null==S?void 0:S.protocol})),[4,ke(t.writeKey,y,b,e,w,_,n)];case 6:return j=o.sent(),b.initialized=!0,b.emit("initialize",t,e),[4,je(b,i,n)];case 7:return o.sent(),[2,[b,j]]}var x,k,E,O,A}))}))}var Oe=function(t){function e(){var e=this,n=_(),r=n.promise,i=n.resolve;return(e=t.call(this,(function(t){return r.then((function(e){return Ee(e[0],e[1],t)}))}))||this)._resolveLoadStart=function(t,e){return i([t,e])},e}return u(e,t),e.prototype.load=function(t,e){return void 0===e&&(e={}),this._resolveLoadStart(t,e),this},e.load=function(t,n){return void 0===n&&(n={}),(new e).load(t,n)},e.standalone=function(t,n){return e.load({writeKey:t},n).then((function(t){return t[0]}))},e}(Lt);const Ae=Object.freeze(Object.defineProperty({__proto__:null,form:function(t,e,n,r){var i=this;return t?(t instanceof HTMLFormElement&&(t=[t]),t.forEach((function(t){if(!(t instanceof Element))throw new TypeError("Must pass HTMLElement to trackForm/trackSubmit.");var o=function(o){var a;o.preventDefault?o.preventDefault():o.returnValue=!1;var u=e instanceof Function?e(t):e,s=n instanceof Function?n(t):n;b(i.track(u,s,null!=r?r:{}),null!==(a=i.settings.timeout)&&void 0!==a?a:500).catch(console.error).then((function(){t.submit()})).catch(console.error)},$=window.jQuery||window.Zepto;$?$(t).submit(o):t.addEventListener("submit",o,!1)})),this):this},link:function(t,e,n,r){var i=this;return t?((t instanceof Element?[t]:"toArray"in t?t.toArray():t).forEach((function(t){t.addEventListener("click",(function(o){var a,u,s=e instanceof Function?e(t):e,c=n instanceof Function?n(t):n,l=t.getAttribute("href")||t.getAttributeNS("http://www.w3.org/1999/xlink","href")||t.getAttribute("xlink:href")||(null===(a=t.getElementsByTagName("a")[0])||void 0===a?void 0:a.getAttribute("href")),f=b(i.track(s,c,null!=r?r:{}),null!==(u=i.settings.timeout)&&void 0!==u?u:500);(function(t,e){return!("_blank"!==t.target||!e)})(t,l)||function(t){var e=t;return!!(e.ctrlKey||e.shiftKey||e.metaKey||e.button&&1==e.button)}(o)||l&&(o.preventDefault?o.preventDefault():o.returnValue=!1,f.catch(console.error).then((function(){window.location.href=l})).catch(console.error))}),!1)})),this):this}},Symbol.toStringTag,{value:"Module"}));function Pe(t,e){return Object.keys(e).reduce((function(n,r){r.startsWith(t)&&(n[r.substr(t.length)]=e[r]);return n}),{})}const Ie=Object.freeze(Object.defineProperty({__proto__:null,queryString:function(e,n){var r=document.createElement("a");r.href=n;var i=r.search.slice(1).split("&").reduce((function(t,e){var n=e.split("="),r=n[0],i=n[1];return t[r]=se(i),t}),{}),o=[],a=i.ajs_uid,u=i.ajs_event,s=i.ajs_aid,c=t(e.options.useQueryString)?e.options.useQueryString:{},l=c.aid,f=void 0===l?/.+/:l,d=c.uid,p=void 0===d?/.+/:d;if(s){var h=Array.isArray(i.ajs_aid)?i.ajs_aid[0]:i.ajs_aid;f.test(h)&&e.setAnonymousId(h)}if(a){var v=Array.isArray(i.ajs_uid)?i.ajs_uid[0]:i.ajs_uid;if(p.test(v)){var y=Pe("ajs_trait_",i);o.push(e.identify(v,y))}}if(u){var g=Array.isArray(i.ajs_event)?i.ajs_event[0]:i.ajs_event,m=Pe("ajs_prop_",i);o.push(e.track(g,m))}return Promise.all(o)}},Symbol.toStringTag,{value:"Module"}));var Me={exports:{}};self;var Ne=Me.exports=function(){var t={2870:function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Store=e.matches=e.transform=void 0;var i=n(4303);Object.defineProperty(e,"transform",{enumerable:!0,get:function(){return r(i).default}});var o=n(2370);Object.defineProperty(e,"matches",{enumerable:!0,get:function(){return r(o).default}});var a=n(1444);Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return r(a).default}})},2370:function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(7843));function o(t,e){if(!Array.isArray(t))return!0===a(t,e);var n,r,i,l,f,d,p,h=t[0];switch(h){case"!":return!o(t[1],e);case"or":for(var v=1;v<t.length;v++)if(o(t[v],e))return!0;return!1;case"and":for(v=1;v<t.length;v++)if(!o(t[v],e))return!1;return!0;case"=":case"!=":return function(t,e,n,r){switch(u(t)&&(t=o(t,r)),u(e)&&(e=o(e,r)),"object"==typeof t&&"object"==typeof e&&(t=JSON.stringify(t),e=JSON.stringify(e)),n){case"=":return t===e;case"!=":return t!==e;default:throw new Error("Invalid operator in compareItems: ".concat(n))}}(a(t[1],e),a(t[2],e),h,e);case"<=":case"<":case">":case">=":return function(t,e,n,r){if(u(t)&&(t=o(t,r)),u(e)&&(e=o(e,r)),"number"!=typeof t||"number"!=typeof e)return!1;switch(n){case"<=":return t<=e;case">=":return t>=e;case"<":return t<e;case">":return t>e;default:throw new Error("Invalid operator in compareNumbers: ".concat(n))}}(a(t[1],e),a(t[2],e),h,e);case"in":return f=a(t[1],e),d=a(t[2],e),p=e,void 0!==d.find((function(t){return a(t,p)===f}));case"contains":return i=a(t[1],e),l=a(t[2],e),"string"==typeof i&&"string"==typeof l&&-1!==i.indexOf(l);case"match":return n=a(t[1],e),r=a(t[2],e),"string"==typeof n&&"string"==typeof r&&function(t,e){var n,r;t:for(;t.length>0;){var i,o;if(i=(n=s(t)).star,o=n.chunk,t=n.pattern,i&&""===o)return!0;var a=c(o,e),u=a.t,l=a.ok,f=a.err;if(f)return!1;if(!l||!(0===u.length||t.length>0)){if(i)for(var d=0;d<e.length;d++){if(u=(r=c(o,e.slice(d+1))).t,l=r.ok,f=r.err,l){if(0===t.length&&u.length>0)continue;e=u;continue t}if(f)return!1}return!1}e=u}return 0===e.length}(r,n);case"lowercase":var y=a(t[1],e);return"string"!=typeof y?null:y.toLowerCase();case"typeof":return typeof a(t[1],e);case"length":return function(t){return null===t?0:Array.isArray(t)||"string"==typeof t?t.length:NaN}(a(t[1],e));default:throw new Error("FQL IR could not evaluate for token: ".concat(h))}}function a(t,e){return Array.isArray(t)?t:"object"==typeof t?t.value:(0,i.default)(e,t)}function u(t){return!!Array.isArray(t)&&(("lowercase"===t[0]||"length"===t[0]||"typeof"===t[0])&&2===t.length||("contains"===t[0]||"match"===t[0])&&3===t.length)}function s(t){for(var e={star:!1,chunk:"",pattern:""};t.length>0&&"*"===t[0];)t=t.slice(1),e.star=!0;var n,r=!1;t:for(n=0;n<t.length;n++)switch(t[n]){case"\\":n+1<t.length&&n++;break;case"[":r=!0;break;case"]":r=!1;break;case"*":if(!r)break t}return e.chunk=t.slice(0,n),e.pattern=t.slice(n),e}function c(t,e){for(var n,r,i={t:"",ok:!1,err:!1};t.length>0;){if(0===e.length)return i;switch(t[0]){case"[":var o=e[0];e=e.slice(1);var a=!0;(t=t.slice(1)).length>0&&"^"===t[0]&&(a=!1,t=t.slice(1));for(var u=!1,s=0;;){if(t.length>0&&"]"===t[0]&&s>0){t=t.slice(1);break}var c,f="";if(c=(n=l(t)).char,t=n.newChunk,n.err)return i;if(f=c,"-"===t[0]&&(f=(r=l(t.slice(1))).char,t=r.newChunk,r.err))return i;c<=o&&o<=f&&(u=!0),s++}if(u!==a)return i;break;case"?":e=e.slice(1),t=t.slice(1);break;case"\\":if(0===(t=t.slice(1)).length)return i.err=!0,i;default:if(t[0]!==e[0])return i;e=e.slice(1),t=t.slice(1)}}return i.t=e,i.ok=!0,i.err=!1,i}function l(t){var e={char:"",newChunk:"",err:!1};return 0===t.length||"-"===t[0]||"]"===t[0]||"\\"===t[0]&&0===(t=t.slice(1)).length?(e.err=!0,e):(e.char=t[0],e.newChunk=t.slice(1),0===e.newChunk.length&&(e.err=!0),e)}e.default=function(t,e){if(!e)throw new Error("No matcher supplied!");switch(e.type){case"all":return!0;case"fql":return function(t,e){if(!t)return!1;try{t=JSON.parse(t)}catch(r){throw new Error('Failed to JSON.parse FQL intermediate representation "'.concat(t,'": ').concat(r))}var n=o(t,e);return"boolean"==typeof n&&n}(e.ir,t);default:throw new Error("Matcher of type ".concat(e.type," unsupported."))}}},1444:function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.rules=[],this.rules=t||[]}return t.prototype.getRulesByDestinationName=function(t){for(var e=[],n=0,r=this.rules;n<r.length;n++){var i=r[n];i.destinationName!==t&&void 0!==i.destinationName||e.push(i)}return e},t}();e.default=n},4303:function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(374)),o=r(n(7843)),a=r(n(5500)),u=n(9014),s=n(4966);function c(t,e){f(t,e.drop,(function(t,e){e.forEach((function(e){return delete t[e]}))}))}function l(t,e){f(t,e.allow,(function(t,e){Object.keys(t).forEach((function(n){e.includes(n)||delete t[n]}))}))}function f(t,e,n){Object.entries(e).forEach((function(e){var r=e[0],i=e[1],a=function(t){"object"==typeof t&&null!==t&&n(t,i)},u=""===r?t:(0,o.default)(t,r);Array.isArray(u)?u.forEach(a):a(u)}))}function d(t,e){var n=JSON.parse(JSON.stringify(t));for(var r in e.map)if(e.map.hasOwnProperty(r)){var i=e.map[r],a=r.split("."),c=void 0;if(a.length>1?(a.pop(),c=(0,o.default)(n,a.join("."))):c=t,"object"==typeof c){if(i.copy){var l=(0,o.default)(n,i.copy);void 0!==l&&(0,u.dset)(t,r,l)}else if(i.move){var f=(0,o.default)(n,i.move);void 0!==f&&(0,u.dset)(t,r,f),(0,s.unset)(t,i.move)}else i.hasOwnProperty("set")&&(0,u.dset)(t,r,i.set);if(i.to_string){var d=(0,o.default)(t,r);if("string"==typeof d||"object"==typeof d&&null!==d)continue;void 0!==d?(0,u.dset)(t,r,JSON.stringify(d)):(0,u.dset)(t,r,"undefined")}}}}function p(t,e){return!(e.sample.percent<=0)&&(e.sample.percent>=1||(e.sample.path?function(t,e){var n=(0,o.default)(t,e.sample.path),r=(0,i.default)(JSON.stringify(n)),u=-64,s=[];h(r.slice(0,8),s);for(var c=0,l=0;l<64&&1!==s[l];l++)c++;if(0!==c){var f=[];h(r.slice(9,16),f),u-=c,s.splice(0,c),f.splice(64-c),s=s.concat(f)}return s[63]=0===s[63]?1:0,(0,a.default)(parseInt(s.join(""),2),u)<e.sample.percent}(t,e):(n=e.sample.percent,Math.random()<=n)));var n}function h(t,e){for(var n=0;n<8;n++)for(var r=t[n],i=128;i>=1;i/=2)r-i>=0?(r-=i,e.push(1)):e.push(0)}e.default=function(t,e){for(var n=t,r=0,i=e;r<i.length;r++){var o=i[r];switch(o.type){case"drop":return null;case"drop_properties":c(n,o.config);break;case"allow_properties":l(n,o.config);break;case"sample_event":if(p(n,o.config))break;return null;case"map_properties":d(n,o.config);break;case"hash_properties":break;default:throw new Error('Transformer of type "'.concat(o.type,'" is unsupported.'))}}return n}},4966:function(t,e,n){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.unset=void 0;var i=r(n(7843));e.unset=function(t,e){if((0,i.default)(t,e)){for(var n=e.split("."),r=n.pop();n.length&&"\\"===n[n.length-1].slice(-1);)r=n.pop().slice(0,-1)+"."+r;for(;n.length;)t=t[e=n.shift()];return delete t[r]}return!0}},9014:function(t,e){e.dset=function(t,e,n){e.split&&(e=e.split("."));for(var r,i,o=0,a=e.length,u=t;o<a&&"__proto__"!==(i=e[o++])&&"constructor"!==i&&"prototype"!==i;)u=u[i]=o===a?n:typeof(r=u[i])==typeof e?r:0*e[o]!=0||~(""+e[o]).indexOf(".")?{}:[]}},3304:function(t){var e="function"==typeof Float64Array?Float64Array:void 0;t.exports=e},7382:function(t,e,n){var r,i=n(5569),o=n(3304),a=n(8482);r=i()?o:a,t.exports=r},8482:function(t){t.exports=function(){throw new Error("not implemented")}},6322:function(t,e,n){var r,i=n(2508),o=n(5679),a=n(882);r=i()?o:a,t.exports=r},882:function(t){t.exports=function(){throw new Error("not implemented")}},5679:function(t){var e="function"==typeof Uint16Array?Uint16Array:void 0;t.exports=e},4773:function(t,e,n){var r,i=n(9773),o=n(3004),a=n(3078);r=i()?o:a,t.exports=r},3078:function(t){t.exports=function(){throw new Error("not implemented")}},3004:function(t){var e="function"==typeof Uint32Array?Uint32Array:void 0;t.exports=e},7980:function(t,e,n){var r,i=n(8114),o=n(6737),a=n(3357);r=i()?o:a,t.exports=r},3357:function(t){t.exports=function(){throw new Error("not implemented")}},6737:function(t){var e="function"==typeof Uint8Array?Uint8Array:void 0;t.exports=e},2684:function(t){var e="function"==typeof Float64Array?Float64Array:null;t.exports=e},5569:function(t,e,n){var r=n(3876);t.exports=r},3876:function(t,e,n){var r=n(1448),i=n(2684);t.exports=function(){var t,e;if("function"!=typeof i)return!1;try{e=new i([1,3.14,-3.14,NaN]),t=r(e)&&1===e[0]&&3.14===e[1]&&-3.14===e[2]&&e[3]!=e[3]}catch(n){t=!1}return t}},9048:function(t,e,n){var r=n(3763);t.exports=r},3763:function(t){var e=Object.prototype.hasOwnProperty;t.exports=function(t,n){return null!=t&&e.call(t,n)}},7009:function(t,e,n){var r=n(6784);t.exports=r},6784:function(t){t.exports=function(){return"function"==typeof Symbol&&"symbol"==typeof Symbol("foo")}},3123:function(t,e,n){var r=n(8481);t.exports=r},8481:function(t,e,n){var r=n(7009)();t.exports=function(){return r&&"symbol"==typeof Symbol.toStringTag}},2508:function(t,e,n){var r=n(3403);t.exports=r},3403:function(t,e,n){var r=n(768),i=n(9668),o=n(187);t.exports=function(){var t,e;if("function"!=typeof o)return!1;try{e=new o(e=[1,3.14,-3.14,i+1,i+2]),t=r(e)&&1===e[0]&&3===e[1]&&e[2]===i-2&&0===e[3]&&1===e[4]}catch(n){t=!1}return t}},187:function(t){var e="function"==typeof Uint16Array?Uint16Array:null;t.exports=e},9773:function(t,e,n){var r=n(2822);t.exports=r},2822:function(t,e,n){var r=n(2744),i=n(3899),o=n(746);t.exports=function(){var t,e;if("function"!=typeof o)return!1;try{e=new o(e=[1,3.14,-3.14,i+1,i+2]),t=r(e)&&1===e[0]&&3===e[1]&&e[2]===i-2&&0===e[3]&&1===e[4]}catch(n){t=!1}return t}},746:function(t){var e="function"==typeof Uint32Array?Uint32Array:null;t.exports=e},8114:function(t,e,n){var r=n(8066);t.exports=r},8066:function(t,e,n){var r=n(8279),i=n(3443),o=n(2731);t.exports=function(){var t,e;if("function"!=typeof o)return!1;try{e=new o(e=[1,3.14,-3.14,i+1,i+2]),t=r(e)&&1===e[0]&&3===e[1]&&e[2]===i-2&&0===e[3]&&1===e[4]}catch(n){t=!1}return t}},2731:function(t){var e="function"==typeof Uint8Array?Uint8Array:null;t.exports=e},1448:function(t,e,n){var r=n(1453);t.exports=r},1453:function(t,e,n){var r=n(6208),i="function"==typeof Float64Array;t.exports=function(t){return i&&t instanceof Float64Array||"[object Float64Array]"===r(t)}},9331:function(t,e,n){var r=n(7980),i={uint16:n(6322),uint8:r};t.exports=i},5902:function(t,e,n){var r=n(4106);t.exports=r},4106:function(t,e,n){var r,i,o=n(9331);(i=new o.uint16(1))[0]=4660,r=52===new o.uint8(i.buffer)[0],t.exports=r},768:function(t,e,n){var r=n(3823);t.exports=r},3823:function(t,e,n){var r=n(6208),i="function"==typeof Uint16Array;t.exports=function(t){return i&&t instanceof Uint16Array||"[object Uint16Array]"===r(t)}},2744:function(t,e,n){var r=n(2326);t.exports=r},2326:function(t,e,n){var r=n(6208),i="function"==typeof Uint32Array;t.exports=function(t){return i&&t instanceof Uint32Array||"[object Uint32Array]"===r(t)}},8279:function(t,e,n){var r=n(208);t.exports=r},208:function(t,e,n){var r=n(6208),i="function"==typeof Uint8Array;t.exports=function(t){return i&&t instanceof Uint8Array||"[object Uint8Array]"===r(t)}},6315:function(t){t.exports=1023},1686:function(t){t.exports=2147483647},3105:function(t){t.exports=2146435072},3449:function(t){t.exports=2147483648},6988:function(t){t.exports=-1023},9777:function(t){t.exports=1023},3690:function(t){t.exports=-1074},2918:function(t,e,n){var r=n(4772).NEGATIVE_INFINITY;t.exports=r},4165:function(t){var e=Number.POSITIVE_INFINITY;t.exports=e},6488:function(t){t.exports=22250738585072014e-324},9668:function(t){t.exports=65535},3899:function(t){t.exports=4294967295},3443:function(t){t.exports=255},7011:function(t,e,n){var r=n(812);t.exports=r},812:function(t,e,n){var r=n(4165),i=n(2918);t.exports=function(t){return t===r||t===i}},1883:function(t,e,n){var r=n(1797);t.exports=r},1797:function(t){t.exports=function(t){return t!=t}},513:function(t,e,n){var r=n(5760);t.exports=r},5760:function(t){t.exports=function(t){return Math.abs(t)}},5848:function(t,e,n){var r=n(677);t.exports=r},677:function(t,e,n){var r=n(3449),i=n(1686),o=n(7838),a=n(1921),u=n(2490),s=[0,0];t.exports=function(t,e){var n,c;return o.assign(t,s,1,0),n=s[0],n&=i,c=a(e),u(n|=c&=r,s[1])}},5500:function(t,e,n){var r=n(8397);t.exports=r},8397:function(t,e,n){var r=n(4165),i=n(2918),o=n(6315),a=n(9777),u=n(6988),s=n(3690),c=n(1883),l=n(7011),f=n(5848),d=n(4948),p=n(8478),h=n(7838),v=n(2490),y=[0,0],g=[0,0];t.exports=function(t,e){var n,m;return 0===t||c(t)||l(t)?t:(d(y,t),e+=y[1],(e+=p(t=y[0]))<s?f(0,t):e>a?t<0?i:r:(e<=u?(e+=52,m=2220446049250313e-31):m=1,h(g,t),n=g[0],n&=2148532223,m*v(n|=e+o<<20,g[1])))}},4772:function(t,e,n){var r=n(7548);t.exports=r},7548:function(t){t.exports=Number},8478:function(t,e,n){var r=n(4500);t.exports=r},4500:function(t,e,n){var r=n(1921),i=n(3105),o=n(6315);t.exports=function(t){var e=r(t);return(e=(e&i)>>>20)-o|0}},2490:function(t,e,n){var r=n(9639);t.exports=r},4445:function(t,e,n){var r,i,o;!0===n(5902)?(i=1,o=0):(i=0,o=1),r={HIGH:i,LOW:o},t.exports=r},9639:function(t,e,n){var r=n(4773),i=n(7382),o=n(4445),a=new i(1),u=new r(a.buffer),s=o.HIGH,c=o.LOW;t.exports=function(t,e){return u[s]=t,u[c]=e,a[0]}},5646:function(t,e,n){var r;r=!0===n(5902)?1:0,t.exports=r},1921:function(t,e,n){var r=n(6285);t.exports=r},6285:function(t,e,n){var r=n(4773),i=n(7382),o=n(5646),a=new i(1),u=new r(a.buffer);t.exports=function(t){return a[0]=t,u[o]}},9024:function(t,e,n){var r=n(6488),i=n(7011),o=n(1883),a=n(513);t.exports=function(t,e,n,u){return o(t)||i(t)?(e[u]=t,e[u+n]=0,e):0!==t&&a(t)<r?(e[u]=4503599627370496*t,e[u+n]=-52,e):(e[u]=t,e[u+n]=0,e)}},4948:function(t,e,n){var r=n(7576),i=n(9422);r(i,"assign",n(9024)),t.exports=i},9422:function(t,e,n){var r=n(9024);t.exports=function(t){return r(t,[0,0],1,0)}},5239:function(t,e,n){var r=n(4773),i=n(7382),o=n(5782),a=new i(1),u=new r(a.buffer),s=o.HIGH,c=o.LOW;t.exports=function(t,e,n,r){return a[0]=t,e[r]=u[s],e[r+n]=u[c],e}},7838:function(t,e,n){var r=n(7576),i=n(4010);r(i,"assign",n(5239)),t.exports=i},5782:function(t,e,n){var r,i,o;!0===n(5902)?(i=1,o=0):(i=0,o=1),r={HIGH:i,LOW:o},t.exports=r},4010:function(t,e,n){var r=n(5239);t.exports=function(t){return r(t,[0,0],1,0)}},7576:function(t,e,n){var r=n(7063);t.exports=r},7063:function(t,e,n){var r=n(6691);t.exports=function(t,e,n){r(t,e,{configurable:!1,enumerable:!1,writable:!1,value:n})}},2073:function(t){var e=Object.defineProperty;t.exports=e},1680:function(t){var e="function"==typeof Object.defineProperty?Object.defineProperty:null;t.exports=e},1471:function(t,e,n){var r=n(1680);t.exports=function(){try{return r({},"x",{}),!0}catch(t){return!1}}},6691:function(t,e,n){var r,i=n(1471),o=n(2073),a=n(1309);r=i()?o:a,t.exports=r},1309:function(t){var e=Object.prototype,n=e.toString,r=e.__defineGetter__,i=e.__defineSetter__,o=e.__lookupGetter__,a=e.__lookupSetter__;t.exports=function(t,u,s){var c,l,f,d;if("object"!=typeof t||null===t||"[object Array]"===n.call(t))throw new TypeError("invalid argument. First argument must be an object. Value: `"+t+"`.");if("object"!=typeof s||null===s||"[object Array]"===n.call(s))throw new TypeError("invalid argument. Property descriptor must be an object. Value: `"+s+"`.");if((l="value"in s)&&(o.call(t,u)||a.call(t,u)?(c=t.__proto__,t.__proto__=e,delete t[u],t[u]=s.value,t.__proto__=c):t[u]=s.value),f="get"in s,d="set"in s,l&&(f||d))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return f&&r&&r.call(t,u,s.get),d&&i&&i.call(t,u,s.set),t}},6208:function(t,e,n){var r,i=n(3123),o=n(7407),a=n(4210);r=i()?a:o,t.exports=r},7407:function(t,e,n){var r=n(173);t.exports=function(t){return r.call(t)}},4210:function(t,e,n){var r=n(9048),i=n(1403),o=n(173);t.exports=function(t){var e,n,a;if(null==t)return o.call(t);n=t[i],e=r(t,i);try{t[i]=void 0}catch(u){return o.call(t)}return a=o.call(t),e?t[i]=n:delete t[i],a}},173:function(t){var e=Object.prototype.toString;t.exports=e},1403:function(t){var e="function"==typeof Symbol?Symbol.toStringTag:"";t.exports=e},7843:function(t){t.exports=function(t,e,n,r,i){for(e=e.split?e.split("."):e,r=0;r<e.length;r++)t=t?t[e[r]]:i;return t===i?n:t}},374:function(t,e,n){n.r(e),n.d(e,{default:function(){return o}});for(var r=[],i=0;i<64;)r[i]=0|4294967296*Math.sin(++i%Math.PI);function o(t){var e,n,o,a=[e=1732584193,n=4023233417,~e,~n],u=[],s=unescape(encodeURI(t))+"€",c=s.length;for(t=--c/4+2|15,u[--t]=8*c;~c;)u[c>>2]|=s.charCodeAt(c)<<8*c--;for(i=s=0;i<t;i+=16){for(c=a;s<64;c=[o=c[3],e+((o=c[0]+[e&n|~e&o,o&e|~o&n,e^n^o,n^(e|~o)][c=s>>4]+r[s]+~~u[i|15&[s,5*s+1,3*s+5,7*s][c]])<<(c=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*c+s++%4])|o>>>-c),e,n])e=0|c[1],n=c[2];for(s=4;s;)a[--s]+=c[s]}for(t="";s<32;)t+=(a[s>>3]>>4*(1^s++)&15).toString(16);return t}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}return n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(2870)}();const Le=Object.freeze(Object.defineProperty({__proto__:null,tsubMiddleware:function(t){return function(e){var n=e.payload,r=e.integration,i=e.next;new Ne.Store(t).getRulesByDestinationName(r).forEach((function(t){for(var e=t.matchers,r=t.transformers,o=0;o<e.length;o++)if(Ne.matches(n.obj,e[o])&&(n.obj=Ne.transform(n.obj,r[o]),null===n.obj))return i(null)})),i(n)}}},Symbol.toStringTag,{value:"Module"}));function Te(t,e){var n,r;return"boolean"==typeof(null==e?void 0:e.enabled)?e.enabled:null===(r=null===(n=null==t?void 0:t.__default)||void 0===n?void 0:n.enabled)||void 0===r||r}function Ce(t){return t.toLowerCase().replace(".","").replace(/\s+/g,"-")}function Re(t,e){return void 0===e&&(e=!1),e?btoa(t).replace(/=/g,""):void 0}function Ue(t,e,n,r){return i(this,void 0,void 0,(function(){var i,a,u,s,c,f;return o(this,(function(o){switch(o.label){case 0:i=Ce(e),a=Re(i,r),u=ae(),s="".concat(u,"/integrations/").concat(null!=a?a:i,"/").concat(n,"/").concat(null!=a?a:i,".dynamic.js.gz"),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,pe(s)];case 2:return o.sent(),function(t,e,n){var r,i;try{var o=(null!==(i=null===(r=null===window||void 0===window?void 0:window.performance)||void 0===r?void 0:r.getEntriesByName(t,"resource"))&&void 0!==i?i:[])[0];o&&e.stats.gauge("legacy_destination_time",Math.round(o.duration),l([n],o.duration<100?["cached"]:[],!0))}catch(a){}}(s,t,e),[3,4];case 3:throw c=o.sent(),t.stats.gauge("legacy_destination_time",-1,["plugin:".concat(e),"failed"]),c;case 4:return f=window["".concat(i,"Deps")],[4,Promise.all(f.map((function(t){return pe(u+t+".gz")})))];case 5:return o.sent(),window["".concat(i,"Loader")](),[2,window["".concat(i,"Integration")]]}}))}))}function De(t,e){return i(this,void 0,void 0,(function(){var n,r=this;return o(this,(function(a){switch(a.label){case 0:return n=[],N()?[2,e]:[4,Kt((function(){return e.length>0&&M()}),(function(){return i(r,void 0,void 0,(function(){var r,i;return o(this,(function(o){switch(o.label){case 0:return(r=e.pop())?[4,y(r,t)]:[2];case 1:return i=o.sent(),i instanceof K||n.push(r),[2]}}))}))}))];case 1:return a.sent(),n.map((function(t){return e.pushWithBackoff(t)})),[2,e]}}))}))}var Fe=function(){function t(t,e,n,r,i,o){void 0===r&&(r={});var u=this;this.options={},this.type="destination",this.middleware=[],this.initializePromise=_(),this.flushing=!1,this.name=t,this.version=e,this.settings=a({},r),this.disableAutoISOConversion=i.disableAutoISOConversion||!1,this.integrationSource=o,this.settings.type&&"browser"===this.settings.type&&delete this.settings.type,this.initializePromise.promise.then((function(t){return u._initialized=t}),(function(){})),this.options=i,this.buffer=i.disableClientPersistence?new p(4,[]):new nt(4,"".concat(n,":dest-").concat(t)),this.scheduleFlush()}return t.prototype.isLoaded=function(){return!!this._ready},t.prototype.ready=function(){var t=this;return this.initializePromise.promise.then((function(){var e;return null!==(e=t.onReady)&&void 0!==e?e:Promise.resolve()}))},t.prototype.load=function(t,e){var n;return i(this,void 0,void 0,(function(){var r,i,a=this;return o(this,(function(o){switch(o.label){case 0:return this._ready||void 0!==this.onReady?[2]:null===(n=this.integrationSource)||void 0===n?[3,1]:(i=n,[3,3]);case 1:return[4,Ue(t,this.name,this.version,this.options.obfuscate)];case 2:i=o.sent(),o.label=3;case 3:r=i,this.integration=function(t,e,n){var r;"Integration"in t?(t({user:function(){return n.user()},addIntegration:function(){}}),r=t.Integration):r=t;var i=new r(e);return i.analytics=n,i}(r,this.settings,e),this.onReady=new Promise((function(t){a.integration.once("ready",(function(){a._ready=!0,t(!0)}))})),this.integration.on("initialize",(function(){a.initializePromise.resolve(!0)}));try{ye(t,{integrationName:this.name,methodName:"initialize",type:"classic"}),this.integration.initialize()}catch(u){throw ye(t,{integrationName:this.name,methodName:"initialize",type:"classic",didError:!0}),this.initializePromise.resolve(!1),u}return[2]}}))}))},t.prototype.unload=function(t,e){return function(t,e,n){return i(this,void 0,void 0,(function(){var r,i,a;return o(this,(function(o){return r=ae(),i=Ce(t),a=Re(t,n),[2,(u="".concat(r,"/integrations/").concat(null!=a?a:i,"/").concat(e,"/").concat(null!=a?a:i,".dynamic.js.gz"),s=de(u),void 0!==s&&s.remove(),Promise.resolve())];var u,s}))}))}(this.name,this.version,this.options.obfuscate)},t.prototype.addMiddleware=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.middleware=(t=this.middleware).concat.apply(t,e)},t.prototype.shouldBuffer=function(t){return"page"!==t.event.type&&(N()||!0!==this._ready||!0!==this._initialized)},t.prototype.send=function(t,e,n){var r,u;return i(this,void 0,void 0,(function(){var i,s,c,l,f,d;return o(this,(function(o){switch(o.label){case 0:return this.shouldBuffer(t)?(this.buffer.push(t),this.scheduleFlush(),[2,t]):(i=null===(u=null===(r=this.options)||void 0===r?void 0:r.plan)||void 0===u?void 0:u.track,s=t.event.event,i&&s&&"Segment.io"!==this.name&&(c=i[s],Te(i,c)?t.updateEvent("integrations",a(a({},t.event.integrations),null==c?void 0:c.integrations)):(t.updateEvent("integrations",a(a({},t.event.integrations),{All:!1,"Segment.io":!0})),t.cancel(new m({retry:!1,reason:"Event ".concat(s," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"}))),(null==c?void 0:c.enabled)&&!1===(null==c?void 0:c.integrations[this.name])&&t.cancel(new m({retry:!1,reason:"Event ".concat(s," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"}))),[4,he(this.name,t.event,this.middleware)]);case 1:if(null===(l=o.sent()))return[2,t];f=new e(l,{traverse:!this.disableAutoISOConversion}),ye(t,{integrationName:this.name,methodName:n,type:"classic"}),o.label=2;case 2:return o.trys.push([2,5,,6]),this.integration?[4,this.integration.invoke.call(this.integration,n,f)]:[3,4];case 3:o.sent(),o.label=4;case 4:return[3,6];case 5:throw d=o.sent(),ye(t,{integrationName:this.name,methodName:n,type:"classic",didError:!0}),d;case 6:return[2,t]}}))}))},t.prototype.track=function(t){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.send(t,S.Track,"track")]}))}))},t.prototype.page=function(t){var e;return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return(null===(e=this.integration)||void 0===e?void 0:e._assumesPageview)&&!this._initialized&&this.integration.initialize(),[4,this.initializePromise.promise];case 1:return n.sent(),[2,this.send(t,S.Page,"page")]}}))}))},t.prototype.identify=function(t){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.send(t,S.Identify,"identify")]}))}))},t.prototype.alias=function(t){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.send(t,S.Alias,"alias")]}))}))},t.prototype.group=function(t){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.send(t,S.Group,"group")]}))}))},t.prototype.scheduleFlush=function(){var t=this;this.flushing||setTimeout((function(){return i(t,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return N()||!0!==this._ready||!0!==this._initialized?(this.scheduleFlush(),[2]):(this.flushing=!0,t=this,[4,De(this,this.buffer)]);case 1:return t.buffer=e.sent(),this.flushing=!1,this.buffer.todo>0&&this.scheduleFlush(),[2]}}))}))}),5e3*Math.random())},t}();const ze=Object.freeze(Object.defineProperty({__proto__:null,LegacyDestination:Fe,ajsDestinations:function(e,n,r,i,o,u){var s,c;if(void 0===r&&(r={}),void 0===i&&(i={}),I())return[];n.plan&&((i=null!=i?i:{}).plan=n.plan);var f=null!==(c=null===(s=n.middlewareSettings)||void 0===s?void 0:s.routingRules)&&void 0!==c?c:[],d=n.integrations,p=i.integrations,h=ue(n,null!=i?i:{}),v=null==u?void 0:u.reduce((function(t,e){var n;return a(a({},t),((n={})[function(t){return("Integration"in t?t.Integration:t).prototype.name}(e)]=e,n))}),{}),y=new Set(l(l([],Object.keys(d).filter((function(t){return function(t,e){var n,r=e.type,i=e.bundlingStatus,o=e.versionSettings,a="unbundled"!==i&&("browser"===r||(null===(n=null==o?void 0:o.componentTypes)||void 0===n?void 0:n.includes("browser")));return!t.startsWith("Segment")&&"Iterable"!==t&&a}(t,d[t])})),!0),Object.keys(v||{}).filter((function(e){return t(d[e])||t(null==p?void 0:p[e])})),!0));return Array.from(y).filter((function(t){return!function(t,e){var n=!1===e.All&&void 0===e[t];return!1===e[t]||n}(t,r)})).map((function(t){var n=function(t){var e,n,r,i;return null!==(i=null!==(n=null===(e=null==t?void 0:t.versionSettings)||void 0===e?void 0:e.override)&&void 0!==n?n:null===(r=null==t?void 0:t.versionSettings)||void 0===r?void 0:r.version)&&void 0!==i?i:"latest"}(d[t]),r=new Fe(t,n,e,h[t],i,null==v?void 0:v[t]);return f.filter((function(e){return e.destinationName===t})).length>0&&o&&r.addMiddleware(o),r}))}},Symbol.toStringTag,{value:"Module"}));const qe=Object.freeze(Object.defineProperty({__proto__:null,loadLegacyVideoPlugins:function(t){return i(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,x((()=>import("./segment-analytics.js-video-plugins-BR_41w99.js").then((t=>t.i))),[],import.meta.url)];case 1:return e=n.sent(),t._plugins=e,[2]}}))}))}},Symbol.toStringTag,{value:"Module"}));const Ke=Object.freeze(Object.defineProperty({__proto__:null,schemaFilter:function(t,e){function n(n){var r=t,i=n.event.event;if(r&&i){var o=r[i];if(!Te(r,o))return n.updateEvent("integrations",a(a({},n.event.integrations),{All:!1,"Segment.io":!0})),n;var u=function(t,e){var n,r;if(!t||!Object.keys(t))return{};var i=t.integrations?Object.keys(t.integrations).filter((function(e){return!1===t.integrations[e]})):[],o=[];return(null!==(n=e.remotePlugins)&&void 0!==n?n:[]).forEach((function(t){i.forEach((function(e){t.creationName==e&&o.push(t.name)}))})),(null!==(r=e.remotePlugins)&&void 0!==r?r:[]).reduce((function(t,e){return e.settings.subscriptions&&o.includes(e.name)&&e.settings.subscriptions.forEach((function(n){return t["".concat(e.name," ").concat(n.partnerAction)]=!1})),t}),{})}(o,e);n.updateEvent("integrations",a(a(a({},n.event.integrations),null==o?void 0:o.integrations),u))}return n}return{name:"Schema Filter",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:n,alias:n,track:n,identify:n,group:n}}},Symbol.toStringTag,{value:"Module"}));const Be=Object.freeze(Object.defineProperty({__proto__:null,remoteMiddlewares:function(t,e,n){var r;return i(this,void 0,void 0,(function(){var a,u,s,c,l=this;return o(this,(function(f){switch(f.label){case 0:return I()?[2,[]]:(a=ae(),u=null!==(r=e.enabledMiddleware)&&void 0!==r?r:{},s=Object.entries(u).filter((function(t){return t[0],t[1]})).map((function(t){return t[0]})),c=s.map((function(e){return i(l,void 0,void 0,(function(){var r,i,u,s;return o(this,(function(o){switch(o.label){case 0:r=e.replace("@segment/",""),i=r,n&&(i=btoa(r).replace(/=/g,"")),u="".concat(a,"/middleware/").concat(i,"/latest/").concat(i,".js.gz"),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,pe(u)];case 2:return o.sent(),[2,window["".concat(r,"Middleware")]];case 3:return s=o.sent(),t.log("error",s),t.stats.increment("failed_remote_middleware"),[3,4];case 4:return[2]}}))}))})),[4,Promise.all(c)]);case 1:return[2,f.sent().filter(Boolean)]}}))}))}},Symbol.toStringTag,{value:"Module"}));export{Oe as A,Tt as c,Ct as g};
Page Not Found
Parece que el enlace que apuntaba aquí no sirve. ¿Quieres probar con una búsqueda?
¡Hola!